1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-08 05:57:51 +03:00

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 commit is contained in:
Andrew Tridgell 2005-01-24 03:43:48 +00:00 committed by Gerald (Jerry) Carter
parent 4adbd01812
commit 3e13e1d526

View File

@ -168,7 +168,17 @@ struct smbcli_composite *smb_composite_fetchfile_send(struct smb_composite_fetch
NTSTATUS smb_composite_fetchfile_recv(struct smbcli_composite *c, NTSTATUS smb_composite_fetchfile_recv(struct smbcli_composite *c,
TALLOC_CTX *mem_ctx) 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, NTSTATUS smb_composite_fetchfile(struct smb_composite_fetchfile *io,