Author: cwittich
Date: Mon Apr 13 08:10:54 2015
New Revision: 67183
URL:
http://svn.reactos.org/svn/reactos?rev=67183&view=rev
Log:
[RAPPS]
fix a big memory leak
Modified:
trunk/reactos/base/applications/rapps/winmain.c
Modified: trunk/reactos/base/applications/rapps/winmain.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/wi…
==============================================================================
--- trunk/reactos/base/applications/rapps/winmain.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/winmain.c [iso-8859-1] Mon Apr 13 08:10:54 2015
@@ -198,6 +198,13 @@
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 */
@@ -215,13 +222,6 @@
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))
{