From b58a5334fae12f28ac3e226114da5fd8ee640d31 Mon Sep 17 00:00:00 2001 From: StapleButter Date: Thu, 7 Dec 2017 01:24:39 +0100 Subject: [PATCH] fix potential memleak --- src/melon_fopen.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/melon_fopen.h b/src/melon_fopen.h index 603e15f2..8e79e8b8 100644 --- a/src/melon_fopen.h +++ b/src/melon_fopen.h @@ -29,7 +29,7 @@ static FILE* melon_fopen(const char* path, const char* mode) if (len < 1) return NULL; WCHAR* fatass = new WCHAR[len]; int res = MultiByteToWideChar(CP_UTF8, 0, path, -1, fatass, len); - if (res != len) return NULL; // checkme? + if (res != len) { delete[] fatass; return NULL; } // checkme? // this will be more than enough WCHAR fatmode[4];