Author: dchapyshev
Date: Thu Sep 22 21:39:25 2016
New Revision: 72777
URL:
http://svn.reactos.org/svn/reactos?rev=72777&view=rev
Log:
[SETUPAPI] Implement freeing memory in SetupDiDestroyClassImageList function. Based on
patch from CircularTriangle06. Thanks! See CORE-11668
Modified:
trunk/reactos/dll/win32/setupapi/devclass.c
Modified: trunk/reactos/dll/win32/setupapi/devclass.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/devclas…
==============================================================================
--- trunk/reactos/dll/win32/setupapi/devclass.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/setupapi/devclass.c [iso-8859-1] Thu Sep 22 21:39:25 2016
@@ -101,10 +101,17 @@
SetLastError(ERROR_INVALID_USER_BUFFER);
else
{
- //DestroyIcon()
- //ImageList_Destroy();
- FIXME("Stub %p\n", ClassImageListData);
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+ /* If Reserved wasn't NULL, then this is valid too */
+ if (ClassImageListData->ImageList)
+ {
+ ImageList_Destroy(ClassImageListData->ImageList);
+ ClassImageListData->ImageList = NULL;
+ }
+
+ MyFree(list);
+ ClassImageListData->Reserved = 0;
+
+ ret = TRUE;
}
TRACE("Returning %d\n", ret);