From b11b2425a9cc919f34d7c8b1dae7b40f3cf11f08 Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Thu, 26 Aug 2010 18:37:00 +0200 Subject: s4:dsdb_module_find_dsheuristics - free the "DN" also on other exit cases --- source4/dsdb/samdb/ldb_modules/util.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source4/dsdb/samdb/ldb_modules/util.c b/source4/dsdb/samdb/ldb_modules/util.c index 2323085c34..f046abf3a6 100644 --- a/source4/dsdb/samdb/ldb_modules/util.c +++ b/source4/dsdb/samdb/ldb_modules/util.c @@ -1172,9 +1172,11 @@ const struct ldb_val *dsdb_module_find_dsheuristics(struct ldb_module *module, attrs, DSDB_FLAG_NEXT_MODULE); if (ret == LDB_SUCCESS && res->count == 1) { + talloc_free(new_dn); return ldb_msg_find_ldb_val(res->msgs[0], "dsHeuristics"); } + talloc_free(new_dn); return NULL; } -- cgit