diff --git a/reactos/dll/win32/setupapi/devclass.c b/reactos/dll/win32/setupapi/devclass.c index 1e2a734320b..2afeae2f30c 100644 --- a/reactos/dll/win32/setupapi/devclass.c +++ b/reactos/dll/win32/setupapi/devclass.c @@ -101,10 +101,17 @@ SetupDiDestroyClassImageList( 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);