From: Stefan Metzmacher Date: Thu, 25 Sep 2008 01:52:04 +0000 (-0700) Subject: s3:lib/ldb: Don't return already freed pointer on error. X-Git-Tag: samba-4.0.0alpha6~769^2~228^2~161 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f27774729e8c88615b9d3d25a85cae0a1fc35c4f;p=thirdparty%2Fsamba.git s3:lib/ldb: Don't return already freed pointer on error. metze Signed-off-by: Karolin Seeger --- diff --git a/source3/lib/ldb/common/ldb.c b/source3/lib/ldb/common/ldb.c index 743711b9672..c8aa6afdfc1 100644 --- a/source3/lib/ldb/common/ldb.c +++ b/source3/lib/ldb/common/ldb.c @@ -787,6 +787,7 @@ int ldb_search(struct ldb_context *ldb, done: if (ret != LDB_SUCCESS) { talloc_free(res); + res = NULL; } *_res = res;