aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStapleButter <thetotalworm@gmail.com>2017-10-11 00:40:56 +0200
committerStapleButter <thetotalworm@gmail.com>2017-10-11 00:40:56 +0200
commit73626e9f45461a48f3a0ce38b791cbb545fa6405 (patch)
tree311ed4ae84568ff5c3c958e7957633be08bc778c /src
parent273fbe24f4b9c866553d2f195f7a2d4306807182 (diff)
fix memory leak
Diffstat (limited to 'src')
-rw-r--r--src/melon_fopen.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/melon_fopen.h b/src/melon_fopen.h
index 2541f84..603e15f 100644
--- a/src/melon_fopen.h
+++ b/src/melon_fopen.h
@@ -38,7 +38,9 @@ static FILE* melon_fopen(const char* path, const char* mode)
fatmode[2] = mode[2];
fatmode[3] = 0;
- return _wfopen(fatass, fatmode);
+ FILE* ret = _wfopen(fatass, fatmode);
+ delete[] fatass;
+ return ret;
}
#else