Commit ec09119f authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

comctl32/button: Fix text buffer leak (Coverity).

parent 06c5e950
......@@ -1293,7 +1293,6 @@ static UINT BUTTON_CalcLayoutRects(const BUTTON_INFO *infoPtr, HDC hdc, RECT *la
/* Get text rect */
maxTextWidth = labelRc->right - labelRc->left;
textRect = BUTTON_GetTextRect(infoPtr, hdc, text, maxTextWidth);
heap_free(text);
/* Show image and text */
if (show_image_and_text(infoPtr))
......@@ -1361,6 +1360,7 @@ static UINT BUTTON_CalcLayoutRects(const BUTTON_INFO *infoPtr, HDC hdc, RECT *la
SetRectEmpty(&imageRect);
}
}
heap_free(text);
CopyRect(labelRc, &labelRect);
CopyRect(imageRc, &imageRect);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment