summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2007-10-30 23:35:04 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:43:46 +0100
commit2de30ecd942e05e5416a9f14c91d58324a0bc6eb (patch)
treee02a80b3bad2fdf98898ef46d97717f55b492d42 /source4/lib
parent46210e11f14373a213ec6fa32a20e9e183d641bf (diff)
downloadsamba-2de30ecd942e05e5416a9f14c91d58324a0bc6eb.tar.gz
samba-2de30ecd942e05e5416a9f14c91d58324a0bc6eb.tar.bz2
samba-2de30ecd942e05e5416a9f14c91d58324a0bc6eb.zip
r25755: Fix a couple of memory leaks, in particular a new leak onto the NULL
context caused by my objectclass module work. Andrew Bartlett (This used to be commit 2a835d900fee71e4461d5d18e39b4358fa6fdfba)
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/ldb/common/ldb_modules.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/lib/ldb/common/ldb_modules.c b/source4/lib/ldb/common/ldb_modules.c
index 9f94c90c92..87e5b2eeb3 100644
--- a/source4/lib/ldb/common/ldb_modules.c
+++ b/source4/lib/ldb/common/ldb_modules.c
@@ -347,15 +347,17 @@ int ldb_load_modules(struct ldb_context *ldb, const char *options[])
if (modules != NULL) {
ret = ldb_load_modules_list(ldb, modules, ldb->modules, &ldb->modules);
- talloc_free(modules);
if (ret != LDB_SUCCESS) {
+ talloc_free(mem_ctx);
return ret;
}
} else {
ldb_debug(ldb, LDB_DEBUG_TRACE, "No modules specified for this database");
}
- return ldb_init_module_chain(ldb, ldb->modules);
+ ret = ldb_init_module_chain(ldb, ldb->modules);
+ talloc_free(mem_ctx);
+ return ret;
}
/*