diff options
author | Tim Prouty <tprouty@samba.org> | 2010-01-04 12:57:34 -0800 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2010-05-17 09:50:14 +0200 |
commit | 6c52bb5a363660f1ace852b8d5e687455dfe1ea4 (patch) | |
tree | dfa91e82258f50342163d6bb76c3b4a3e432fee5 /source3/libsmb/cliconnect.c | |
parent | 758730f4b4cdfd2cffe1cef015671ee4cd89cee1 (diff) | |
download | samba-6c52bb5a363660f1ace852b8d5e687455dfe1ea4.tar.gz |
s3 torture: Prevent smbcli segfault when running smbtorture3 against an smbd with security=share
Fix bug #7370 (3.5.2 smbclient segfaults when used against old samba
"security = share").
(cherry picked from commit db511272f3393a35a1e596740b88487333ebeb24)
Diffstat (limited to 'source3/libsmb/cliconnect.c')
-rw-r--r-- | source3/libsmb/cliconnect.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index 7aa89010ffb..22be999a15f 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -1320,6 +1320,8 @@ struct tevent_req *cli_tcon_andx_create(TALLOC_CTX *mem_ctx, char *tmp = NULL; uint8_t *bytes; + *psmbreq = NULL; + req = tevent_req_create(mem_ctx, &state, struct cli_tcon_andx_state); if (req == NULL) { return NULL; @@ -1455,6 +1457,9 @@ struct tevent_req *cli_tcon_andx_send(TALLOC_CTX *mem_ctx, if (req == NULL) { return NULL; } + if (subreq == NULL) { + return req; + } status = cli_smb_req_send(subreq); if (!NT_STATUS_IS_OK(status)) { tevent_req_nterror(req, status); |