]> git.ipfire.org Git - thirdparty/git.git/commit
mailinfo: fix pointential memory leak if `decode_header` failed
authorLidong Yan <502024330056@smail.nju.edu.cn>
Tue, 13 May 2025 02:49:10 +0000 (02:49 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 15 May 2025 20:50:18 +0000 (13:50 -0700)
commit56f1cd10f48a5f630633a0e65696917e6f70fdd9
tree90cfae52de6a8cf9cd3dc27a5d029c1ea61c2270
parent1a8a4971cc6c179c4dd711f4a7f5d7178f4b3ab7
mailinfo: fix pointential memory leak if `decode_header` failed

In mailinfo.c:decode_header, if convert_to_utf8 failed, the strbuf stored
in dec will leak. Simply add strbuf_release and free(dec) will solve
this problem.

Signed-off-by: Lidong Yan <502024330056@smail.nju.edu.cn>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
mailinfo.c