From: Ondrej Dubaj Date: Wed, 31 Mar 2021 09:54:52 +0000 (+0200) Subject: Fixed leak of rar before ending with error X-Git-Tag: v3.5.2~23^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=04106bd41897eed23a8a562e083a353f4897c579;p=thirdparty%2Flibarchive.git Fixed leak of rar before ending with error --- diff --git a/libarchive/archive_read_support_format_rar5.c b/libarchive/archive_read_support_format_rar5.c index 58a61d1bc..5d62d16ee 100644 --- a/libarchive/archive_read_support_format_rar5.c +++ b/libarchive/archive_read_support_format_rar5.c @@ -4076,6 +4076,7 @@ int archive_read_support_format_rar5(struct archive *_a) { if(ARCHIVE_OK != rar5_init(rar)) { archive_set_error(&ar->archive, ENOMEM, "Can't allocate rar5 filter buffer"); + free(rar); return ARCHIVE_FATAL; }