Merge pull request #2895 from antekone/feature/github-1980/memleak-in-cab/1

CAB reader: fix memory leak on repeated calls to archive_read_support_format_cab

(cherry picked from commit 639412f636)
This commit is contained in:
Tim Kientzle authored and Martin Matuska committed 2026-03-10 09:31:08 +01:00
1 parent d345984235
commit 5bb5988601
1 file changed
+3 -1
+3 -1
View File
@@ -383,8 +383,10 @@ archive_read_support_format_cab(struct archive *_a)
NULL,
NULL);
if (r != ARCHIVE_OK)
if (r != ARCHIVE_OK) {
archive_wstring_free(&cab->ws);
free(cab);
}
return (ARCHIVE_OK);
}