r11594: ensure ldb_search() sets *res to NULL on failure (some of the updated
authorAndrew Tridgell <tridge@samba.org>
Wed, 9 Nov 2005 08:07:38 +0000 (08:07 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:45:55 +0000 (13:45 -0500)
ldb_result code coud rely on that)

source/lib/ldb/common/ldb.c

index 48911cad6b462fa870f47da73b896e00881af3b8..ea99bf3e8bc31d5942b980d868147b46b8214e30 100644 (file)
@@ -235,6 +235,8 @@ int ldb_search(struct ldb_context *ldb,
        struct ldb_parse_tree *tree;
        int ret;
 
+       (*res) = NULL;
+
        request = talloc(ldb, struct ldb_request);
        if (request == NULL) {
                ldb_set_errstring(ldb->modules, talloc_strdup(ldb, "Not Enough memory"));