From b488c175185959cf8a34797198d06b717e0c4310 Mon Sep 17 00:00:00 2001 From: oltolm Date: Wed, 5 Nov 2025 19:34:13 +0100 Subject: [PATCH] fix GCC warning C:/src/ppsspp/Core/System.cpp: In function 'void DumpFileIfEnabled(const u8*, u32, std::string_view, DumpFileType)': C:/src/ppsspp/Core/System.cpp:938:29: warning: 'void free(void*)' called on pointer returned from a mismatched allocation function [-Wmismatched-new-delete] 938 | free(path); | ~~~~^~~~~~ C:/src/ppsspp/Core/System.cpp:924:67: note: returned from 'void* operator new [](std::size_t)' 924 | char *path = new char[strlen(fullPath.c_str()) + 1]; | --- Core/System.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/System.cpp b/Core/System.cpp index 749d6bd75a..de4b4990b3 100644 --- a/Core/System.cpp +++ b/Core/System.cpp @@ -935,7 +935,7 @@ void DumpFileIfEnabled(const u8 *dataPtr, const u32 length, std::string_view nam } }, path); } else { - free(path); + delete[] path; } return; }