[PATCH] fix smbclient segfault

Michael Adam obnox at samba.org
Mon Sep 22 01:59:34 MDT 2014


Hi,

shouldn't subreq be freed before leaving the function,
i.e. further down?

Cheers - Michael

On 2014-09-22 at 08:20 +0200, Andreas Schneider wrote:
> Hello,
> 
> attached find a patch to fix a segfault in smbclient.
> 
> 
> 	-- andreas
> 
> -- 
> Andreas Schneider                   GPG-ID: CC014E3D
> Samba Team                             asn at samba.org
> www.samba.org

> >From f9a5b1113341745557da56e61b1e79d8a8d4c500 Mon Sep 17 00:00:00 2001
> From: Andreas Schneider <asn at samba.org>
> Date: Wed, 17 Sep 2014 15:17:50 +0200
> Subject: [PATCH] libcli: Fix a segfault calling smbXcli_req_set_pending() on
>  NULL.
> 
> BUG: https://bugzilla.samba.org/show_bug.cgi?id=10817
> 
> Signed-off-by: Andreas Schneider <asn at samba.org>
> ---
>  libcli/smb/smb1cli_echo.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/libcli/smb/smb1cli_echo.c b/libcli/smb/smb1cli_echo.c
> index 4fb7c60..10dff2d 100644
> --- a/libcli/smb/smb1cli_echo.c
> +++ b/libcli/smb/smb1cli_echo.c
> @@ -96,7 +96,6 @@ static void smb1cli_echo_done(struct tevent_req *subreq)
>  				  NULL, /* pbytes_offset */
>  				  NULL, /* pinbuf */
>  				  expected, ARRAY_SIZE(expected));
> -	TALLOC_FREE(subreq);
>  	if (!NT_STATUS_IS_OK(status)) {
>  		tevent_req_nterror(req, status);
>  		return;
> -- 
> 2.1.0
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20140922/c062840b/attachment.pgp>


More information about the samba-technical mailing list