From f7cc513f2a50edefaf03ddce8f36c58277f5e84e Mon Sep 17 00:00:00 2001 From: Christoph von Wittich Date: Mon, 13 Apr 2015 08:10:54 +0000 Subject: [PATCH] [RAPPS] fix a big memory leak svn path=/trunk/; revision=67183 --- reactos/base/applications/rapps/winmain.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/reactos/base/applications/rapps/winmain.c b/reactos/base/applications/rapps/winmain.c index 577c80371a1..9fdefef4eb9 100644 --- a/reactos/base/applications/rapps/winmain.c +++ b/reactos/base/applications/rapps/winmain.c @@ -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 */