diff options
author | Simo Sorce <idra@samba.org> | 2006-03-03 22:52:57 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:52:14 -0500 |
commit | 8edf29e8ef4d886321a6e8ec3902065641d34f40 (patch) | |
tree | f0fbc9be4612e112ff5c611e0a83c3df26d6e596 /source4/lib/ldb/ldb_ildap | |
parent | e07f36a48cbc1b24192bddd3d27b164d52bfe31c (diff) | |
download | samba-8edf29e8ef4d886321a6e8ec3902065641d34f40.tar.gz samba-8edf29e8ef4d886321a6e8ec3902065641d34f40.tar.xz samba-8edf29e8ef4d886321a6e8ec3902065641d34f40.zip |
r13827: Minor enhancements or cosmetic changes
(This used to be commit 7ef63abae12f65835a82f9931ad1f5ea75e5f3f6)
Diffstat (limited to 'source4/lib/ldb/ldb_ildap')
-rw-r--r-- | source4/lib/ldb/ldb_ildap/ldb_ildap.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source4/lib/ldb/ldb_ildap/ldb_ildap.c b/source4/lib/ldb/ldb_ildap/ldb_ildap.c index 869aec01cdb..3467e65bf9f 100644 --- a/source4/lib/ldb/ldb_ildap/ldb_ildap.c +++ b/source4/lib/ldb/ldb_ildap/ldb_ildap.c @@ -536,12 +536,15 @@ static int ildb_search_bytree(struct ldb_module *module, const struct ldb_dn *ba ret = ildb_search_async(module, base, scope, tree, attrs, control_req, res, &ildb_search_sync_callback, ildb->ldap->timeout, &handle); - if (ret != LDB_SUCCESS) - return ret; + if (ret == LDB_SUCCESS) { + ret = ldb_async_wait(module->ldb, handle, LDB_WAIT_ALL); + talloc_free(handle); + } - ret = ldb_async_wait(module->ldb, handle, LDB_WAIT_ALL); + if (ret != LDB_SUCCESS) { + talloc_free(*res); + } - talloc_free(handle); return ret; } |