diff options
author | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-07-04 20:04:28 +0200 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-07-04 22:05:17 +0200 |
commit | b0bba4003e928cdf0540047d6e4b7659cb0ac765 (patch) | |
tree | 6e081ebf9f77c54b434252bdb2237ad0cfd7afd9 /source4/libnet | |
parent | 05237dca11b902104e271120a31a8a3114b35cc4 (diff) | |
download | samba-b0bba4003e928cdf0540047d6e4b7659cb0ac765.tar.gz samba-b0bba4003e928cdf0540047d6e4b7659cb0ac765.tar.bz2 samba-b0bba4003e928cdf0540047d6e4b7659cb0ac765.zip |
s4:libnet - add missing "talloc_free"s for "c" contexts on "recv" operations
Diffstat (limited to 'source4/libnet')
-rw-r--r-- | source4/libnet/libnet_group.c | 3 | ||||
-rw-r--r-- | source4/libnet/libnet_lookup.c | 4 | ||||
-rw-r--r-- | source4/libnet/libnet_user.c | 6 |
3 files changed, 8 insertions, 5 deletions
diff --git a/source4/libnet/libnet_group.c b/source4/libnet/libnet_group.c index f098667555..8c88aa38bb 100644 --- a/source4/libnet/libnet_group.c +++ b/source4/libnet/libnet_group.c @@ -147,6 +147,7 @@ NTSTATUS libnet_CreateGroup_recv(struct composite_context *c, r->out.error_string = talloc_strdup(mem_ctx, nt_errstr(status)); } + talloc_free(c); return status; } @@ -408,7 +409,6 @@ NTSTATUS libnet_GroupInfo_recv(struct composite_context* c, TALLOC_CTX *mem_ctx, } talloc_free(c); - return status; } @@ -731,6 +731,7 @@ NTSTATUS libnet_GroupList_recv(struct composite_context *c, TALLOC_CTX *mem_ctx, io->out.error_string = talloc_asprintf(mem_ctx, "Error: %s", nt_errstr(status)); } + talloc_free(c); return status; } diff --git a/source4/libnet/libnet_lookup.c b/source4/libnet/libnet_lookup.c index 21851d5ae8..177292c7cd 100644 --- a/source4/libnet/libnet_lookup.c +++ b/source4/libnet/libnet_lookup.c @@ -217,9 +217,7 @@ NTSTATUS libnet_LookupDCs_recv(struct composite_context *c, TALLOC_CTX *mem_ctx, { NTSTATUS status; status = finddcs_recv(c, mem_ctx, &io->out.num_dcs, &io->out.dcs); - if (!NT_STATUS_IS_OK(status)) { - return status; - } + /* "c" already freed here */ return status; } diff --git a/source4/libnet/libnet_user.c b/source4/libnet/libnet_user.c index f05d2bd566..0055639974 100644 --- a/source4/libnet/libnet_user.c +++ b/source4/libnet/libnet_user.c @@ -178,6 +178,7 @@ NTSTATUS libnet_CreateUser_recv(struct composite_context *c, TALLOC_CTX *mem_ctx r->out.error_string = talloc_strdup(mem_ctx, nt_errstr(status)); } + talloc_free(c); return status; } @@ -346,6 +347,7 @@ NTSTATUS libnet_DeleteUser_recv(struct composite_context *c, TALLOC_CTX *mem_ctx r->out.error_string = talloc_steal(mem_ctx, s->r.out.error_string); } + talloc_free(c); return status; } @@ -572,6 +574,8 @@ NTSTATUS libnet_ModifyUser_recv(struct composite_context *c, TALLOC_CTX *mem_ctx struct libnet_ModifyUser *r) { NTSTATUS status = composite_wait(c); + + talloc_free(c); return status; } @@ -868,7 +872,6 @@ NTSTATUS libnet_UserInfo_recv(struct composite_context *c, TALLOC_CTX *mem_ctx, } talloc_free(c); - return status; } @@ -1195,6 +1198,7 @@ NTSTATUS libnet_UserList_recv(struct composite_context* c, TALLOC_CTX *mem_ctx, r->out.error_string = talloc_asprintf(mem_ctx, "Error: %s", nt_errstr(status)); } + talloc_free(c); return status; } |