From e0c72c85e50a9ee8161993b780b095fc03a54d04 Mon Sep 17 00:00:00 2001 From: Chee Yee Date: Thu, 27 Jun 2024 11:10:56 -0700 Subject: [PATCH] fix crash while error reading from archive --- source/zip_util.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/source/zip_util.cpp b/source/zip_util.cpp index 389211f..a343f0d 100644 --- a/source/zip_util.cpp +++ b/source/zip_util.cpp @@ -667,10 +667,6 @@ namespace ZipUtil if (ret < ARCHIVE_OK) { sprintf(status_message, "%s", "archive_read_next_header failed"); - if (client_data != nullptr) - { - free(client_data); - } archive_read_free(a); return nullptr; } @@ -745,10 +741,6 @@ namespace ZipUtil if (ret < ARCHIVE_OK) { sprintf(status_message, "%s", "archive_read_next_header failed"); - if (client_data != nullptr) - { - free(client_data); - } archive_read_free(a); return nullptr; }