diff options
author | Volker Lendecke <vl@samba.org> | 2009-03-06 14:24:59 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2009-03-07 15:27:13 +0100 |
commit | e58ade4136b40d82c24f3556845e7412a3330992 (patch) | |
tree | 7117da19f2455013e5b3dda6bbcff555d46b8688 | |
parent | c29826a697f8d92b6b481a694c05b4d8a8e7424d (diff) | |
download | samba-e58ade4136b40d82c24f3556845e7412a3330992.tar.gz samba-e58ade4136b40d82c24f3556845e7412a3330992.tar.bz2 samba-e58ade4136b40d82c24f3556845e7412a3330992.zip |
Fix a smbclient segfault against security=share servers
-rw-r--r-- | source3/libsmb/cliconnect.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index e3d1b65be0..ec2932488e 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -1297,10 +1297,17 @@ struct async_req *cli_tcon_andx_send(TALLOC_CTX *mem_ctx, return result; access_denied: - result = async_req_new(mem_ctx); - if (async_post_ntstatus(result, ev, NT_STATUS_ACCESS_DENIED)) { - return result; + { + struct cli_request *state; + if (!async_req_setup(mem_ctx, &result, &state, + struct cli_request)) { + goto fail; + } + if (async_post_ntstatus(result, ev, NT_STATUS_ACCESS_DENIED)) { + return result; + } } + fail: TALLOC_FREE(result); return NULL; } |