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
-rw-r--r--source4/dsdb/samdb/ldb_modules/partition.c2
2 files changed, 5 insertions, 1 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;
}
diff --git a/source4/dsdb/samdb/ldb_modules/partition.c b/source4/dsdb/samdb/ldb_modules/partition.c
index 3231f7ab0f..663ff074af 100644
--- a/source4/dsdb/samdb/ldb_modules/partition.c
+++ b/source4/dsdb/samdb/ldb_modules/partition.c
@@ -151,7 +151,7 @@ static struct dsdb_control_current_partition *find_partition(struct partition_pr
}
return NULL;
-};
+}
/**
* fire the caller's callback for every entry, but only send 'done' once.