svn commit: samba r4957 - in
branches/SAMBA_4_0/source/libcli/composite: .
tridge at samba.org
tridge at samba.org
Mon Jan 24 03:43:49 GMT 2005
Author: tridge
Date: 2005-01-24 03:43:48 +0000 (Mon, 24 Jan 2005)
New Revision: 4957
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=4957
Log:
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
Modified:
branches/SAMBA_4_0/source/libcli/composite/fetchfile.c
Changeset:
Modified: branches/SAMBA_4_0/source/libcli/composite/fetchfile.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/composite/fetchfile.c 2005-01-24 03:33:36 UTC (rev 4956)
+++ branches/SAMBA_4_0/source/libcli/composite/fetchfile.c 2005-01-24 03:43:48 UTC (rev 4957)
@@ -168,7 +168,17 @@
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,
More information about the samba-cvs
mailing list