diff options
author | Simo Sorce <idra@samba.org> | 2006-12-05 03:52:58 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:28:51 -0500 |
commit | 07b7d84f0601c7047341c33493fcc9695e5e703b (patch) | |
tree | 5c29056b9a97338f76d0df401a7a3448e77bc3d0 /source4/lib/ldb | |
parent | 5e583a96d4da28daac71efd44002480bb3f0fe17 (diff) | |
download | samba-07b7d84f0601c7047341c33493fcc9695e5e703b.tar.gz samba-07b7d84f0601c7047341c33493fcc9695e5e703b.tar.bz2 samba-07b7d84f0601c7047341c33493fcc9695e5e703b.zip |
r20033: Never commit before testing
Never commit before testing
Never commit before testing
:-)
(This used to be commit fdd6ce6b7e288137aeaf62f9869441c73bedbd45)
Diffstat (limited to 'source4/lib/ldb')
-rw-r--r-- | source4/lib/ldb/common/ldb.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source4/lib/ldb/common/ldb.c b/source4/lib/ldb/common/ldb.c index 733f0bc29a..b52cc8e301 100644 --- a/source4/lib/ldb/common/ldb.c +++ b/source4/lib/ldb/common/ldb.c @@ -803,11 +803,12 @@ int ldb_search_exp_fmt(struct ldb_context *ldb, TALLOC_CTX *mem_ctx, struct ldb_ struct ldb_dn *base, enum ldb_scope scope, const char * const *attrs, const char *exp_fmt, ...) { - struct ldb_result **res; + struct ldb_result *res; char *expression; va_list ap; int ret; + res = NULL; *result = NULL; va_start(ap, exp_fmt); @@ -818,11 +819,13 @@ int ldb_search_exp_fmt(struct ldb_context *ldb, TALLOC_CTX *mem_ctx, struct ldb_ return LDB_ERR_OPERATIONS_ERROR; } - ret = ldb_search(ldb, base, scope, expression, attrs, res); + ret = ldb_search(ldb, base, scope, expression, attrs, &res); if (ret == LDB_SUCCESS) { talloc_steal(mem_ctx, res); - result = res; + *result = res; + } else { + talloc_free(res); } talloc_free(expression); |