From 7164e00f40f15e56dc0f3d727bd4955e4927d45a Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 30 Mar 2018 13:10:14 -0500 Subject: libcli: Fix CID 710748 Resource leak Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison Reviewed-by: Stefan Metzmacher --- libcli/smb/smbXcli_base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libcli') diff --git a/libcli/smb/smbXcli_base.c b/libcli/smb/smbXcli_base.c index fbf24416093..ad1b67b8476 100644 --- a/libcli/smb/smbXcli_base.c +++ b/libcli/smb/smbXcli_base.c @@ -2105,10 +2105,10 @@ static NTSTATUS smb1cli_inbuf_parse_chain(uint8_t *buf, TALLOC_CTX *mem_ctx, wct_ofs = SVAL(cur[0].iov_base, 2); if (wct_ofs < taken) { - return NT_STATUS_INVALID_NETWORK_RESPONSE; + goto inval; } if (wct_ofs > buflen) { - return NT_STATUS_INVALID_NETWORK_RESPONSE; + goto inval; } /* -- cgit v1.2.1