Nikolay Sivov : comctl32/updown: Use HeapAlloc() wrappers.
Alexandre Julliard
julliard at winehq.org
Fri Feb 2 12:24:38 CST 2018
Module: wine
Branch: master
Commit: db261c31cec141be51826f4c4a9fdfe1a4499664
URL: https://source.winehq.org/git/wine.git/?a=commit;h=db261c31cec141be51826f4c4a9fdfe1a4499664
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Fri Feb 2 08:39:38 2018 +0300
comctl32/updown: Use HeapAlloc() wrappers.
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/comctl32/updown.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/dlls/comctl32/updown.c b/dlls/comctl32/updown.c
index 67b646d..b75df4f 100644
--- a/dlls/comctl32/updown.c
+++ b/dlls/comctl32/updown.c
@@ -42,6 +42,7 @@
#include "comctl32.h"
#include "uxtheme.h"
#include "vssym32.h"
+#include "wine/heap.h"
#include "wine/unicode.h"
#include "wine/debug.h"
@@ -920,7 +921,7 @@ static LRESULT WINAPI UpDownWindowProc(HWND hwnd, UINT message, WPARAM wParam, L
{
CREATESTRUCTW *pcs = (CREATESTRUCTW*)lParam;
- infoPtr = Alloc (sizeof(UPDOWN_INFO));
+ infoPtr = heap_alloc_zero(sizeof(*infoPtr));
SetWindowLongPtrW (hwnd, 0, (DWORD_PTR)infoPtr);
/* initialize the info struct */
@@ -953,9 +954,9 @@ static LRESULT WINAPI UpDownWindowProc(HWND hwnd, UINT message, WPARAM wParam, L
break;
case WM_DESTROY:
- Free (infoPtr->AccelVect);
+ heap_free (infoPtr->AccelVect);
UPDOWN_ResetSubclass (infoPtr);
- Free (infoPtr);
+ heap_free (infoPtr);
SetWindowLongPtrW (hwnd, 0, 0);
theme = GetWindowTheme (hwnd);
CloseThemeData (theme);
@@ -1080,13 +1081,13 @@ static LRESULT WINAPI UpDownWindowProc(HWND hwnd, UINT message, WPARAM wParam, L
TRACE("UDM_SETACCEL\n");
if(infoPtr->AccelVect) {
- Free (infoPtr->AccelVect);
+ heap_free (infoPtr->AccelVect);
infoPtr->AccelCount = 0;
infoPtr->AccelVect = 0;
}
if(wParam==0) return TRUE;
- infoPtr->AccelVect = Alloc (wParam*sizeof(UDACCEL));
- if(infoPtr->AccelVect == 0) return FALSE;
+ infoPtr->AccelVect = heap_alloc(wParam*sizeof(UDACCEL));
+ if(!infoPtr->AccelVect) return FALSE;
memcpy(infoPtr->AccelVect, (void*)lParam, wParam*sizeof(UDACCEL));
infoPtr->AccelCount = wParam;
More information about the wine-cvs
mailing list