s3:lib/ldb: Don't return already freed pointer on error.
authorStefan Metzmacher <metze@samba.org>
Thu, 25 Sep 2008 01:52:04 +0000 (18:52 -0700)
committerKarolin Seeger <kseeger@samba.org>
Thu, 25 Sep 2008 14:18:43 +0000 (07:18 -0700)
metze

Signed-off-by: Karolin Seeger <kseeger@samba.org>
source/lib/ldb/common/ldb.c

index 743711b9672ca73a482767a855c7dc9db439d2a6..c8aa6afdfc131cc08f9f6caf9f9081a5e709a112 100644 (file)
@@ -787,6 +787,7 @@ int ldb_search(struct ldb_context *ldb,
 done:
        if (ret != LDB_SUCCESS) {
                talloc_free(res);
+               res = NULL;
        }
 
        *_res = res;