diff options
author | Andrew Bartlett <abartlet@samba.org> | 2005-11-02 03:08:52 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:45:40 -0500 |
commit | 827cbb480c6de7471554c97cb4cef13e5db7b2b3 (patch) | |
tree | 1d807adc079a4e0cfe860d08e0ae63a0a139822f /source4/libcli/raw/clitree.c | |
parent | 6dfb09c5a5b85fa7fce85b518cc2a6ee008b0bbd (diff) | |
download | samba-827cbb480c6de7471554c97cb4cef13e5db7b2b3.tar.gz samba-827cbb480c6de7471554c97cb4cef13e5db7b2b3.tar.xz samba-827cbb480c6de7471554c97cb4cef13e5db7b2b3.zip |
r11466: Clear up some memory leaks in smbclient.
Andrew Bartlett
(This used to be commit 6535959fd7dfddd6bafb77a266ec3a641025f880)
Diffstat (limited to 'source4/libcli/raw/clitree.c')
-rw-r--r-- | source4/libcli/raw/clitree.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source4/libcli/raw/clitree.c b/source4/libcli/raw/clitree.c index 990552d64f..96d36c569c 100644 --- a/source4/libcli/raw/clitree.c +++ b/source4/libcli/raw/clitree.c @@ -172,10 +172,14 @@ NTSTATUS smbcli_tree_full_connection(TALLOC_CTX *parent_ctx, { struct smb_composite_connect io; NTSTATUS status; + TALLOC_CTX *tmp_ctx = talloc_new(parent_ctx); + if (!tmp_ctx) { + return NT_STATUS_NO_MEMORY; + } io.in.dest_host = dest_host; io.in.port = port; - io.in.called_name = strupper_talloc(parent_ctx, dest_host); + io.in.called_name = strupper_talloc(tmp_ctx, dest_host); io.in.service = service; io.in.service_type = service_type; io.in.credentials = credentials; @@ -186,6 +190,6 @@ NTSTATUS smbcli_tree_full_connection(TALLOC_CTX *parent_ctx, if (NT_STATUS_IS_OK(status)) { *ret_tree = io.out.tree; } - + talloc_free(tmp_ctx); return status; } |