https://bugs.winehq.org/show_bug.cgi?id=49861
Bug ID: 49861 Summary: Attempting to destroy an ImageList which has already been destroyed Product: Wine Version: 5.17 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: cryptui Assignee: wine-bugs@winehq.org Reporter: contact@kcsoftwares.com Distribution: ---
Attempting to destroy an ImageList which has already been destroyed
When closing CertUI, (or sub dialogs) attempts are made to Destroy ImageList that have already been destroyed. This is due to explicit call ImageList_Destroy while these ImageList are also linked to a listview object which also tries to delete these ImageList in LISTVIEW_NCDestroy.
Documented in ReactOS here and Wine is affected the same way : Ticket : https://jira.reactos.org/browse/CORE-17290 Pull Request : https://github.com/reactos/reactos/pull/3211
Affected lines, to be removed from code ( https://source.winehq.org/git/wine.git/blob_plain/HEAD:/dlls/cryptui/main.c ) - L792 : ImageList_Destroy((HIMAGELIST)GetWindowLongPtrW(hwnd, DWLP_USER)); - L796 : ImageList_Destroy((HIMAGELIST)GetWindowLongPtrW(hwnd, DWLP_USER)); - L1284 : ImageList_Destroy(data->imageList); - L7379 : ImageList_Destroy(data->imageList); - L7387 : ImageList_Destroy(data->imageList);
Meanwhile, some memory freeing is located in WM_COMMAND while it should be in WM_DESTROY at L1224 & L7359