diff options
author | Slava Semushin <php-coder@altlinux.org> | 2009-06-12 13:32:48 +0200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2009-06-18 13:49:26 +1000 |
commit | ef45b31886bbe34856abba718448972b62b48d3e (patch) | |
tree | 9b561ad83252d21b894b2523079ae8636c39a6a4 /source4/client | |
parent | 89e979fe998095c4bbcbacd4530a045b90f0dffa (diff) | |
download | samba-ef45b31886bbe34856abba718448972b62b48d3e.tar.gz samba-ef45b31886bbe34856abba718448972b62b48d3e.tar.bz2 samba-ef45b31886bbe34856abba718448972b62b48d3e.zip |
source4/client/client.c: Possible memory leaks
Patch for bug #6446
cppcheck found 2 possible memory leaks:
[./source4/client/client.c:3305]: (error) Memory leak: base_directory
[./source4/client/client.c:3305]: (error) Memory leak: desthost
Patch in attach.
Diffstat (limited to 'source4/client')
-rw-r--r-- | source4/client/client.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source4/client/client.c b/source4/client/client.c index 018be29761..82aeef3290 100644 --- a/source4/client/client.c +++ b/source4/client/client.c @@ -3290,15 +3290,18 @@ static int do_message_op(const char *netbios_name, const char *desthost, lp_gensec_settings(ctx, cmdline_lp_ctx))) return 1; - if (base_directory) + if (base_directory) { do_cd(ctx, base_directory); + free(base_directory); + } if (cmdstr) { rc = process_command_string(ctx, cmdstr); } else { rc = process_stdin(ctx); } - + + free(desthost); talloc_free(mem_ctx); return rc; |