r22474: If ldb does not return sucess, then the res variable may not be valid.
authorAndrew Bartlett <abartlet@samba.org>
Mon, 23 Apr 2007 07:22:16 +0000 (07:22 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:51:30 +0000 (14:51 -0500)
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

index 5b3520766dd17480573071d6c2579b3e93e33f71..c317fe57faff77316143a32d1db34c98135b2df7 100644 (file)
@@ -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);