diff options
author | Simo Sorce <idra@samba.org> | 2006-10-15 23:14:19 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:21:04 -0500 |
commit | 59b66744f7318d8197f0d2029bf3b641dafa327e (patch) | |
tree | 03d44cfb4bc655088a411552743531246e06974b /source4/param | |
parent | a719444f68c7448f53ce61dc9f02e552a98fedcf (diff) | |
download | samba-59b66744f7318d8197f0d2029bf3b641dafa327e.tar.gz samba-59b66744f7318d8197f0d2029bf3b641dafa327e.tar.bz2 samba-59b66744f7318d8197f0d2029bf3b641dafa327e.zip |
r19299: Fix possible memleaks
(This used to be commit 6fad80bb09113a60689061a2de67711c9924708b)
Diffstat (limited to 'source4/param')
-rw-r--r-- | source4/param/share_ldb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/param/share_ldb.c b/source4/param/share_ldb.c index fba204c834..ac56b950c8 100644 --- a/source4/param/share_ldb.c +++ b/source4/param/share_ldb.c @@ -172,11 +172,11 @@ static NTSTATUS sldb_list_all(TALLOC_CTX *mem_ctx, ldb = talloc_get_type(ctx->priv_data, struct ldb_context); ret = ldb_search(ldb, ldb_dn_explode(tmp_ctx, "CN=SHARES"), LDB_SCOPE_SUBTREE, "(name=*)", NULL, &res); + talloc_steal(tmp_ctx, res); if (ret != LDB_SUCCESS) { talloc_free(tmp_ctx); return NT_STATUS_BAD_NETWORK_NAME; } - talloc_steal(tmp_ctx, res); n = talloc_array(mem_ctx, const char *, res->count); if (!n) { @@ -228,11 +228,11 @@ static NTSTATUS sldb_get_config(TALLOC_CTX *mem_ctx, return NT_STATUS_NO_MEMORY; } ret = ldb_search(ldb, ldb_dn_explode(tmp_ctx, "CN=SHARES"), LDB_SCOPE_SUBTREE, filter, NULL, &res); + talloc_steal(tmp_ctx, res); if (ret != LDB_SUCCESS || res->count != 1) { talloc_free(tmp_ctx); return NT_STATUS_BAD_NETWORK_NAME; } - talloc_steal(tmp_ctx, res); s = talloc(tmp_ctx, struct share_config); if (!s) { |