git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
42e3ae6
)
s4:ldb: do talloc_free and return NULL when we have no matches to return
author
Björn Jacke
<bj@sernet.de>
Mon, 30 Mar 2009 11:18:34 +0000
(13:18 +0200)
committer
Stefan Metzmacher
<metze@samba.org>
Tue, 21 Apr 2009 22:03:22 +0000
(
00:03
+0200)
source4/dsdb/samdb/ldb_modules/anr.c
patch
|
blob
|
history
diff --git
a/source4/dsdb/samdb/ldb_modules/anr.c
b/source4/dsdb/samdb/ldb_modules/anr.c
index a04f5ebfa6ff46d28604365d5cc87316c92c34b0..deeccac072a84216ac081a65001f64760afde44e 100644
(file)
--- a/
source4/dsdb/samdb/ldb_modules/anr.c
+++ b/
source4/dsdb/samdb/ldb_modules/anr.c
@@
-89,6
+89,7
@@
static struct ldb_parse_tree *make_match_tree(struct ldb_module *module,
match_tree->u.substring.chunks = talloc_array(match_tree, struct ldb_val *, 2);
if (match_tree->u.substring.chunks == NULL){
+ talloc_free(match_tree);
ldb_oom(ldb);
return NULL;
}
@@
-99,6
+100,9
@@
static struct ldb_parse_tree *make_match_tree(struct ldb_module *module,
match_tree->u.equality.attr = attr;
match_tree->u.equality.value = *match;
break;
+ default:
+ talloc_free(match_tree);
+ return NULL;
}
return match_tree;
}