mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-09-08 19:12:56 +02:00
Fix use after free in wasi.cpp found by AddressSanitizer
This commit is contained in:
parent
cae4166765
commit
decb4236bd
1 changed files with 2 additions and 3 deletions
|
@ -109,9 +109,8 @@ wasi_zip_container::wasi_zip_container(const void *buffer, zip_uint64_t length,
|
|||
wasi_zip_container::~wasi_zip_container() {
|
||||
if (zip != NULL) {
|
||||
zip_close(zip);
|
||||
if (source != NULL) {
|
||||
zip_source_close(source);
|
||||
}
|
||||
} else if (source != NULL) {
|
||||
zip_source_close(source);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue