svn commit: samba r18272 - in
branches/SAMBA_4_0/source/lib/ldb/common: .
idra at samba.org
idra at samba.org
Fri Sep 8 14:32:36 GMT 2006
Author: idra
Date: 2006-09-08 14:32:36 +0000 (Fri, 08 Sep 2006)
New Revision: 18272
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18272
Log:
Couldn't resist to change this.
What we want to do here is to just make sure res is freed.
Well let's just do so explicitly, the steal cofused me
initially while reading the code. This way it is clear
what we want to do.
Simo.
Modified:
branches/SAMBA_4_0/source/lib/ldb/common/ldb.c
Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/common/ldb.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/common/ldb.c 2006-09-08 14:28:06 UTC (rev 18271)
+++ branches/SAMBA_4_0/source/lib/ldb/common/ldb.c 2006-09-08 14:32:36 UTC (rev 18272)
@@ -163,11 +163,11 @@
ret = ldb_search(ldb, ldb_dn_new(tmp_ctx), LDB_SCOPE_BASE,
"(objectClass=*)", attrs, &res);
if (ret == LDB_SUCCESS) {
- talloc_steal(tmp_ctx, res);
if (res->count == 1) {
basedn = ldb_msg_find_attr_as_dn(ldb, res->msgs[0], "defaultNamingContext");
ldb_set_opaque(ldb, "default_baseDN", basedn);
}
+ talloc_free(res);
}
talloc_free(tmp_ctx);
More information about the samba-cvs
mailing list