diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-01-24 03:43:48 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:09:10 -0500 |
commit | 657583b9b9da6076fe0f2b850f0536249d314dea (patch) | |
tree | 5e2e41e9488fb42a29129b3fc0719f42023309a5 /source4/libcli/composite/fetchfile.c | |
parent | bdbd32d3ff1848aacbc1d1784a99beb8f388c301 (diff) | |
download | samba-657583b9b9da6076fe0f2b850f0536249d314dea.tar.gz samba-657583b9b9da6076fe0f2b850f0536249d314dea.tar.bz2 samba-657583b9b9da6076fe0f2b850f0536249d314dea.zip |
r4957: the fetchfile _recv() function was neglecting to steal the data and
free the connection context. This left a whole lot of state hanging
around and didn't give the memory to the caller properly
(This used to be commit 3e13e1d526563d91cb2342ae68455e54eb49a9bd)
Diffstat (limited to 'source4/libcli/composite/fetchfile.c')
-rw-r--r-- | source4/libcli/composite/fetchfile.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/source4/libcli/composite/fetchfile.c b/source4/libcli/composite/fetchfile.c index 24f4808f64..8178090398 100644 --- a/source4/libcli/composite/fetchfile.c +++ b/source4/libcli/composite/fetchfile.c @@ -168,7 +168,17 @@ struct smbcli_composite *smb_composite_fetchfile_send(struct smb_composite_fetch NTSTATUS smb_composite_fetchfile_recv(struct smbcli_composite *c, TALLOC_CTX *mem_ctx) { - return smb_composite_wait(c); + NTSTATUS status; + + status = smb_composite_wait(c); + + if (NT_STATUS_IS_OK(status)) { + struct fetchfile_state *state = talloc_get_type(c->private, struct fetchfile_state); + talloc_steal(mem_ctx, state->io->out.data); + } + + talloc_free(c); + return status; } NTSTATUS smb_composite_fetchfile(struct smb_composite_fetchfile *io, |