summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
Diffstat (limited to 'source4/dsdb')
-rw-r--r--source4/dsdb/samdb/ldb_modules/anr.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/anr.c b/source4/dsdb/samdb/ldb_modules/anr.c
index a04f5ebfa6..deeccac072 100644
--- 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;
}