mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2024-11-14 21:37:42 -07:00
fix potential memleak
This commit is contained in:
parent
a7c7779917
commit
b58a5334fa
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user