diff options
author | StapleButter <thetotalworm@gmail.com> | 2017-12-07 01:24:39 +0100 |
---|---|---|
committer | StapleButter <thetotalworm@gmail.com> | 2017-12-07 01:24:39 +0100 |
commit | b58a5334fae12f28ac3e226114da5fd8ee640d31 (patch) | |
tree | 1cfb0b7011acd26e3939c2c4c516c08befe9b65f | |
parent | a7c777991796c1fea066a3d8d6127dbe4895a058 (diff) |
fix potential memleak
-rw-r--r-- | src/melon_fopen.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/melon_fopen.h b/src/melon_fopen.h index 603e15f..8e79e8b 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]; |