mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 21:05:43 +00:00
[COMCTL32] Don't leak memory in CB_ThemedPaint()
CID 1441313
This commit is contained in:
parent
6416ee982f
commit
52da844825
1 changed files with 4 additions and 0 deletions
|
@ -1995,12 +1995,16 @@ static void CB_ThemedPaint(HTHEME theme, const BUTTON_INFO *infoPtr, HDC hDC, Bu
|
||||||
}
|
}
|
||||||
|
|
||||||
heap_free(text);
|
heap_free(text);
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
text = NULL;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __REACTOS__
|
#ifdef __REACTOS__
|
||||||
if (cdrf == CDRF_NOTIFYPOSTPAINT)
|
if (cdrf == CDRF_NOTIFYPOSTPAINT)
|
||||||
BUTTON_SendCustomDraw(infoPtr, hDC, CDDS_POSTPAINT, &bgRect);
|
BUTTON_SendCustomDraw(infoPtr, hDC, CDDS_POSTPAINT, &bgRect);
|
||||||
cleanup:
|
cleanup:
|
||||||
|
if (text) heap_free(text);
|
||||||
#endif
|
#endif
|
||||||
if (created_font) DeleteObject(font);
|
if (created_font) DeleteObject(font);
|
||||||
if (hPrevFont) SelectObject(hDC, hPrevFont);
|
if (hPrevFont) SelectObject(hDC, hPrevFont);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue