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:
1 parent
d345984235
commit
5bb5988601
1 file changed
+3
-1
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user