summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-06-04 15:53:52 +0200
committerStefan Metzmacher <metze@samba.org>2012-06-05 17:33:49 +0200
commit324c51c25b064d5a6270274472779d260f913fe6 (patch)
tree8fc3d0899b933addeb0f86524b058788bb051b8c
parentcd99e612022ec8607c7a2e85f0835621eb337b7b (diff)
downloadsamba-324c51c25b064d5a6270274472779d260f913fe6.tar.gz
samba-324c51c25b064d5a6270274472779d260f913fe6.tar.bz2
samba-324c51c25b064d5a6270274472779d260f913fe6.zip
s3:libsmb: don't require a pinbuf in cli_smb_recv() to keep the memory
metze
-rw-r--r--source3/libsmb/async_smb.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/libsmb/async_smb.c b/source3/libsmb/async_smb.c
index e30435a225..c2986e25e9 100644
--- a/source3/libsmb/async_smb.c
+++ b/source3/libsmb/async_smb.c
@@ -275,6 +275,11 @@ NTSTATUS cli_smb_recv(struct tevent_req *req,
} else {
*pinbuf = inbuf;
}
+ } else if (mem_ctx != NULL) {
+ if (talloc_reference_count(inbuf) == 0) {
+ (void)talloc_move(mem_ctx, &inbuf);
+ TALLOC_FREE(recv_iov);
+ }
}
return status;