]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Fixed leak of rar before ending with error 1521/head
authorOndrej Dubaj <odubaj@redhat.com>
Wed, 31 Mar 2021 09:54:52 +0000 (11:54 +0200)
committerOndrej Dubaj <odubaj@redhat.com>
Wed, 31 Mar 2021 09:57:32 +0000 (11:57 +0200)
libarchive/archive_read_support_format_rar5.c

index 58a61d1bcb29a24c2a136cb9c7eeaf00efddc636..5d62d16ee00f54685924c9dff59fa175aadd589a 100644 (file)
@@ -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;
        }