diff options
author | Andrew Bartlett <abartlet@samba.org> | 2004-07-12 09:02:09 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:57:32 -0500 |
commit | e053c719ab0f270dbad46dfb9e6eeae22e3b833d (patch) | |
tree | 9c02d10c3d4062c085187ae4de7cdc6c9b2474d7 | |
parent | 196860f948f04035a603a826ae2a64f8286a63dd (diff) | |
download | samba-e053c719ab0f270dbad46dfb9e6eeae22e3b833d.tar.gz samba-e053c719ab0f270dbad46dfb9e6eeae22e3b833d.tar.bz2 samba-e053c719ab0f270dbad46dfb9e6eeae22e3b833d.zip |
r1460: Avoid a compile warning.
Andrew Bartlett
(This used to be commit 10a973da88441b255eda7cbc263ef5c4f2f0fcae)
-rw-r--r-- | source4/libcli/raw/clitree.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source4/libcli/raw/clitree.c b/source4/libcli/raw/clitree.c index f1513ea51c..fcb0a9a660 100644 --- a/source4/libcli/raw/clitree.c +++ b/source4/libcli/raw/clitree.c @@ -189,6 +189,7 @@ NTSTATUS cli_tree_full_connection(struct cli_tree **ret_tree, union smb_sesssetup setup; union smb_tcon tcon; TALLOC_CTX *mem_ctx; + char *in_path = NULL; *ret_tree = NULL; @@ -272,7 +273,9 @@ NTSTATUS cli_tree_full_connection(struct cli_tree **ret_tree, tcon.generic.level = RAW_TCON_TCONX; tcon.tconx.in.flags = 0; tcon.tconx.in.password = data_blob(NULL, 0); - asprintf(&tcon.tconx.in.path, "\\\\%s\\%s", dest_host, service); + + asprintf(in_path, "\\\\%s\\%s", dest_host, service); + tcon.tconx.in.path = in_path; if (!service_type) { if (strequal(service, "IPC$")) service_type = "IPC"; @@ -283,7 +286,7 @@ NTSTATUS cli_tree_full_connection(struct cli_tree **ret_tree, status = smb_tree_connect(tree, mem_ctx, &tcon); - free(tcon.tconx.in.path); + SAFE_FREE(in_path); if (!NT_STATUS_IS_OK(status)) { cli_tree_close(tree); |