From: Günther Deschner Date: Mon, 11 Aug 2025 14:58:51 +0000 (+0200) Subject: libcli/smb: Fix CID #710784 Resource leak X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f5349093e756a191010772bdfa157a7be622a4cc;p=thirdparty%2Fsamba.git libcli/smb: Fix CID #710784 Resource leak buf was (re-)allocated on NULL context thus not part of frame that is freed. Guenther Signed-off-by: Guenther Deschner Reviewed-by: Andreas Schneider --- diff --git a/libcli/smb/util.c b/libcli/smb/util.c index 297d463626c..c42b21a6fb9 100644 --- a/libcli/smb/util.c +++ b/libcli/smb/util.c @@ -267,6 +267,7 @@ static uint8_t *internal_bytes_push_str(uint8_t *buf, bool ucs2, ucs2 ? CH_UTF16LE : CH_DOS, str, str_len, &converted, &converted_size)) { + TALLOC_FREE(buf); TALLOC_FREE(frame); return NULL; }