From 34f0cff0664f1c160ee7442461e9f875e8d8f4dc Mon Sep 17 00:00:00 2001 From: Tim Prouty Date: Mon, 4 Jan 2010 12:57:34 -0800 Subject: [PATCH] s3 torture: Prevent smbcli segfault when running smbtorture3 against an smbd with security=share --- 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 31216b8..fa79ebc 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); -- 1.6.5.7