Commit 8ed31e2c authored by Detlef Riekenberg's avatar Detlef Riekenberg Committed by Alexandre Julliard

appwiz.cpl: Do not access memory after HeapFree in FreeAppInfo.

parent 352d8570
......@@ -110,27 +110,17 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason,
*/
static void FreeAppInfo(APPINFO *info)
{
APPINFO *iter = info;
while (iter)
while (info)
{
if (iter->title)
HeapFree(GetProcessHeap(), 0, iter->title);
if (iter->path)
HeapFree(GetProcessHeap(), 0, iter->path);
if (iter->icon)
HeapFree(GetProcessHeap(), 0, iter->icon);
if (iter->publisher)
HeapFree(GetProcessHeap(), 0, iter->publisher);
if (iter->version)
HeapFree(GetProcessHeap(), 0, iter->version);
iter = iter->next;
HeapFree(GetProcessHeap(), 0, iter);
APPINFO *next_info = info->next;
HeapFree(GetProcessHeap(), 0, info->title);
HeapFree(GetProcessHeap(), 0, info->path);
HeapFree(GetProcessHeap(), 0, info->icon);
HeapFree(GetProcessHeap(), 0, info->publisher);
HeapFree(GetProcessHeap(), 0, info->version);
HeapFree(GetProcessHeap(), 0, info);
info = next_info;
}
}
......
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