fix a big memory leak

svn path=/trunk/; revision=67183
This commit is contained in:
Christoph von Wittich 2015-04-13 08:10:54 +00:00
parent 90529d6033
commit f7cc513f2a

View file

@ -198,6 +198,13 @@ UpdateApplicationsList(INT EnumType)
SendMessage(hListView, WM_SETREDRAW, FALSE, 0);
if (EnumType == -1) EnumType = SelectedEnumType;
if (IS_INSTALLED_ENUM(SelectedEnumType))
FreeInstalledAppList();
else if (IS_AVAILABLE_ENUM(SelectedEnumType))
FreeAvailableAppList();
(VOID) ListView_DeleteAllItems(hListView);
/* Create image list */
@ -216,13 +223,6 @@ UpdateApplicationsList(INT EnumType)
ImageList_AddIcon(hImageListView, hIcon);
DestroyIcon(hIcon);
if (EnumType == -1) EnumType = SelectedEnumType;
if (IS_INSTALLED_ENUM(SelectedEnumType))
FreeInstalledAppList();
else if (IS_AVAILABLE_ENUM(SelectedEnumType))
FreeAvailableAppList();
if (IS_INSTALLED_ENUM(EnumType))
{
/* Enum installed applications and updates */