Commit 392321f4 authored by Sebastian Lackner's avatar Sebastian Lackner Committed by Alexandre Julliard

comctl32: Allocate new memory in notify_forward_header() to avoid Free() on…

comctl32: Allocate new memory in notify_forward_header() to avoid Free() on wrong pointer. (Valgrind).
parent e5e4ef07
......@@ -784,6 +784,7 @@ static LRESULT notify_forward_header(const LISTVIEW_INFO *infoPtr, NMHEADERW *lp
if (lpnmh->pitem->mask & HDI_TEXT)
{
text = (LPCWSTR)lpnmh->pitem->pszText;
lpnmh->pitem->pszText = NULL;
Str_SetPtrWtoA(&lpnmh->pitem->pszText, text);
}
/* convert filter text */
......@@ -791,6 +792,7 @@ static LRESULT notify_forward_header(const LISTVIEW_INFO *infoPtr, NMHEADERW *lp
lpnmh->pitem->pvFilter)
{
filter = (LPCWSTR)((HD_TEXTFILTERA*)lpnmh->pitem->pvFilter)->pszText;
((HD_TEXTFILTERA*)lpnmh->pitem->pvFilter)->pszText = NULL;
Str_SetPtrWtoA(&((HD_TEXTFILTERA*)lpnmh->pitem->pvFilter)->pszText, filter);
}
}
......
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