Re: user.exe16: Fix memory leaks in cases when HeapReAlloc fails.
21 Jun
2017
21 Jun
'17
8:39 a.m.
Dmitry Timoshkov <dmitry(a)baikal.ru> writes:
@@ -3286,7 +3289,8 @@ DWORD WINAPI FormatMessage16( } talloced = strlen(target)+1; if (nSize && talloced<nSize) { - target = HeapReAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,target,nSize); + LPSTR new_target = HeapReAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,target,nSize); + if (new_target) target = new_target;
You could probably remove it entirely. -- Alexandre Julliard julliard(a)winehq.org
3099
Age (days ago)
3099
Last active (days ago)
0 comments
1 participants
participants (1)
-
Alexandre Julliard