diff options
Diffstat (limited to 'src/mir_core')
-rw-r--r-- | src/mir_core/src/memory.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mir_core/src/memory.cpp b/src/mir_core/src/memory.cpp index a9ab2f1af9..d2b055a221 100644 --- a/src/mir_core/src/memory.cpp +++ b/src/mir_core/src/memory.cpp @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (�) 2012-16 Miranda NG project (http://miranda-ng.org),
+Copyright (�) 2012-16 Miranda NG project (http://miranda-ng.org),
Copyright (c) 2000-12 Miranda IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -107,8 +107,10 @@ MIR_C_CORE_DLL(void*) mir_realloc(void* ptr, size_t size) }
else p = NULL;
+ ptr = p;
p = (char*)realloc(p, size + sizeof(DWORD)*3);
if (p == NULL) {
+ free(ptr);
OutputDebugStringA("memory overflow\n");
#if defined(_DEBUG)
DebugBreak();
|