summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2007-11-27 02:47:57 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:46:19 +0100
commit93e3a4720622253397d0965ef80ea803576ae110 (patch)
tree5d98390831fb52f0844faa3edb617a874b81c9c6 /source4/dsdb
parentadef944c4314daded57d21b8f1dd2a1b8156740e (diff)
downloadsamba-93e3a4720622253397d0965ef80ea803576ae110.tar.gz
samba-93e3a4720622253397d0965ef80ea803576ae110.tar.bz2
samba-93e3a4720622253397d0965ef80ea803576ae110.zip
r26138: Don't talloc_free() res if an error occoured.
Andrew Bartlett (This used to be commit 4a8a1003f3cc8db530182138e2331e860149e844)
Diffstat (limited to 'source4/dsdb')
-rw-r--r--source4/dsdb/samdb/cracknames.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/dsdb/samdb/cracknames.c b/source4/dsdb/samdb/cracknames.c
index e607dbc5de..c0c44c8602 100644
--- a/source4/dsdb/samdb/cracknames.c
+++ b/source4/dsdb/samdb/cracknames.c
@@ -110,7 +110,10 @@ static enum drsuapi_DsNameStatus LDB_lookup_spn_alias(krb5_context context, stru
if (ret != LDB_SUCCESS && ret != LDB_ERR_NO_SUCH_OBJECT) {
DEBUG(1, ("ldb_search: dn: %s not found: %s", service_dn_str, ldb_errstring(ldb_ctx)));
return DRSUAPI_DS_NAME_STATUS_RESOLVE_ERROR;
- } else if (ret == LDB_ERR_NO_SUCH_OBJECT || res->count != 1) {
+ } else if (ret == LDB_ERR_NO_SUCH_OBJECT) {
+ DEBUG(1, ("ldb_search: dn: %s not found", service_dn_str));
+ return DRSUAPI_DS_NAME_STATUS_NOT_FOUND;
+ } else if (res->count != 1) {
talloc_free(res);
DEBUG(1, ("ldb_search: dn: %s not found", service_dn_str));
return DRSUAPI_DS_NAME_STATUS_NOT_FOUND;