diff options
Diffstat (limited to 'src/core/file_sys/vfs_libzip.cpp')
-rw-r--r-- | src/core/file_sys/vfs_libzip.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/file_sys/vfs_libzip.cpp b/src/core/file_sys/vfs_libzip.cpp index e34474ae0..8bdaa7e4a 100644 --- a/src/core/file_sys/vfs_libzip.cpp +++ b/src/core/file_sys/vfs_libzip.cpp @@ -15,13 +15,13 @@ VirtualDir ExtractZIP(VirtualFile file) { zip_error_t error{}; const auto data = file->ReadAllBytes(); - std::unique_ptr<zip_source_t, decltype(&zip_source_free)> src{ - zip_source_buffer_create(data.data(), data.size(), 0, &error), zip_source_free}; + std::unique_ptr<zip_source_t, decltype(&zip_source_close)> src{ + zip_source_buffer_create(data.data(), data.size(), 0, &error), zip_source_close}; if (src == nullptr) return nullptr; - std::unique_ptr<zip_t, decltype(&zip_discard)> zip{zip_open_from_source(src.get(), 0, &error), - zip_discard}; + std::unique_ptr<zip_t, decltype(&zip_close)> zip{zip_open_from_source(src.get(), 0, &error), + zip_close}; if (zip == nullptr) return nullptr; |