From: Tim Prouty Date: Mon, 4 Jan 2010 20:57:34 +0000 (-0800) Subject: s3 torture: Prevent smbcli segfault when running smbtorture3 against an smbd with... X-Git-Tag: samba-4.0.0alpha11~150 X-Git-Url: http://git.samba.org/?p=samba.git;a=commitdiff_plain;h=34f0cff0664f1c160ee7442461e9f875e8d8f4dc;hp=dc689827114c46b3ca2a75082421dc2d98001ce7 s3 torture: Prevent smbcli segfault when running smbtorture3 against an smbd with security=share --- diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index 31216b82409..fa79ebcea36 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -1573,6 +1573,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; @@ -1708,6 +1710,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);