diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2012-07-18 04:59:31 +0930 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2012-07-18 04:59:31 +0930 |
commit | dcec7c1f71937ad301be95050fb0e69aede7648c (patch) | |
tree | a0bea7678f2a6368020ad346bcf546280ff688bd /source3/client | |
parent | 634a63d934db6f01fd8c2584af9ab05e05762a0d (diff) | |
download | samba-dcec7c1f71937ad301be95050fb0e69aede7648c.tar.gz |
source3/client/client.c: fix stackframe leak.
do_message_op() doesn't free its stackframe in various paths.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'source3/client')
-rw-r--r-- | source3/client/client.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/source3/client/client.c b/source3/client/client.c index 42c5efc3a0..e31cd6b85a 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -5557,10 +5557,8 @@ static int do_message_op(struct user_auth_info *a_info) if (tar_type) { if (cmdstr) process_command_string(cmdstr); - return do_tar_op(base_directory); - } - - if (query_host && *query_host) { + rc = do_tar_op(base_directory); + } else if (query_host && *query_host) { char *qhost = query_host; char *slash; @@ -5578,15 +5576,11 @@ static int do_message_op(struct user_auth_info *a_info) sscanf(p, "%x", &name_type); } - return do_host_query(qhost); - } - - if (message) { - return do_message_op(auth_info); - } - - if (process(base_directory)) { - return 1; + rc = do_host_query(qhost); + } else if (message) { + rc = do_message_op(auth_info); + } else if (process(base_directory)) { + rc = 1; } TALLOC_FREE(frame); |