summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-08-14 18:47:15 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-08-14 18:48:20 +0200
commitab3e20b82fca206d03a68acc501fdbd5a59b47a7 (patch)
tree0bbc63db7754ff4c170e4a47966e58d480b034aa /source4
parent2de63aa2801a907905b3e05557074af5b896d486 (diff)
downloadsamba-ab3e20b82fca206d03a68acc501fdbd5a59b47a7.tar.gz
samba-ab3e20b82fca206d03a68acc501fdbd5a59b47a7.tar.bz2
samba-ab3e20b82fca206d03a68acc501fdbd5a59b47a7.zip
s4:libnet - free the "c" context also on error conditions
(and if it's NULL then "talloc_free" does ignore it)
Diffstat (limited to 'source4')
-rw-r--r--source4/libnet/libnet_group.c1
-rw-r--r--source4/libnet/libnet_user.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/source4/libnet/libnet_group.c b/source4/libnet/libnet_group.c
index 7679b42610..e3d51f342b 100644
--- a/source4/libnet/libnet_group.c
+++ b/source4/libnet/libnet_group.c
@@ -704,6 +704,7 @@ NTSTATUS libnet_GroupList_recv(struct composite_context *c, TALLOC_CTX *mem_ctx,
struct grouplist_state *s;
if (c == NULL || mem_ctx == NULL || io == NULL) {
+ talloc_free(c);
return NT_STATUS_INVALID_PARAMETER;
}
diff --git a/source4/libnet/libnet_user.c b/source4/libnet/libnet_user.c
index 7f93b3f6d5..d0eb5afde8 100644
--- a/source4/libnet/libnet_user.c
+++ b/source4/libnet/libnet_user.c
@@ -1171,9 +1171,10 @@ NTSTATUS libnet_UserList_recv(struct composite_context* c, TALLOC_CTX *mem_ctx,
struct userlist_state *s;
if (c == NULL || mem_ctx == NULL || r == NULL) {
+ talloc_free(c);
return NT_STATUS_INVALID_PARAMETER;
}
-
+
status = composite_wait(c);
if (NT_STATUS_IS_OK(status) ||
NT_STATUS_EQUAL(status, STATUS_MORE_ENTRIES) ||