projects
/
reactos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6416ee9
)
[COMCTL32] Don't leak memory in CB_ThemedPaint()
author
Pierre Schweitzer
<pierre@reactos.org>
Fri, 16 Nov 2018 20:52:38 +0000
(21:52 +0100)
committer
Pierre Schweitzer
<pierre@reactos.org>
Fri, 16 Nov 2018 21:07:09 +0000
(22:07 +0100)
CID
1441313
dll/win32/comctl32/button.c
patch
|
blob
|
history
diff --git
a/dll/win32/comctl32/button.c
b/dll/win32/comctl32/button.c
index
6a0a226
..
5906747
100644
(file)
--- a/
dll/win32/comctl32/button.c
+++ b/
dll/win32/comctl32/button.c
@@
-1995,12
+1995,16
@@
static void CB_ThemedPaint(HTHEME theme, const BUTTON_INFO *infoPtr, HDC hDC, Bu
}
heap_free(text);
+#ifdef __REACTOS__
+ text = NULL;
+#endif
}
#ifdef __REACTOS__
if (cdrf == CDRF_NOTIFYPOSTPAINT)
BUTTON_SendCustomDraw(infoPtr, hDC, CDDS_POSTPAINT, &bgRect);
cleanup:
+ if (text) heap_free(text);
#endif
if (created_font) DeleteObject(font);
if (hPrevFont) SelectObject(hDC, hPrevFont);