From 8fd7839702c132b64c556a7e58a30fa910c04382 Mon Sep 17 00:00:00 2001 From: Martin Matuska Date: Tue, 31 Jan 2017 04:03:31 +0100 Subject: [PATCH] Plug memory leak in zip_read_local_file_header() --- libarchive/archive_read_support_format_zip.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libarchive/archive_read_support_format_zip.c b/libarchive/archive_read_support_format_zip.c index cde62ee62..c8a9c148d 100644 --- a/libarchive/archive_read_support_format_zip.c +++ b/libarchive/archive_read_support_format_zip.c @@ -905,6 +905,7 @@ zip_read_local_file_header(struct archive_read *a, struct archive_entry *entry, archive_wstrcat(&s, wp); archive_wstrappend_wchar(&s, L'/'); archive_entry_copy_pathname_w(entry, s.s); + archive_wstring_free(&s); } } else { cp = archive_entry_pathname(entry); @@ -915,6 +916,7 @@ zip_read_local_file_header(struct archive_read *a, struct archive_entry *entry, archive_strcat(&s, cp); archive_strappend_char(&s, '/'); archive_entry_set_pathname(entry, s.s); + archive_string_free(&s); } } } -- 2.47.2