From a2848dbf1fa9eafdef93bd914b12ff2f9f223a70 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 23 Apr 2007 07:22:16 +0000 Subject: [PATCH] r22474: If ldb does not return sucess, then the res variable may not be valid. It *should* just be NULL from the initialisation above, but I've had this not be the case... Andrew Bartlett --- source/lib/ldb/common/ldb.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/source/lib/ldb/common/ldb.c b/source/lib/ldb/common/ldb.c index 5b3520766dd..c317fe57faf 100644 --- a/source/lib/ldb/common/ldb.c +++ b/source/lib/ldb/common/ldb.c @@ -970,8 +970,6 @@ int ldb_search_exp_fmt(struct ldb_context *ldb, TALLOC_CTX *mem_ctx, struct ldb_ if (ret == LDB_SUCCESS) { talloc_steal(mem_ctx, res); *result = res; - } else { - talloc_free(res); } talloc_free(expression); -- 2.34.1