From: Tim Clem <tclem@codeweavers.com> --- dlls/sechost/service.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dlls/sechost/service.c b/dlls/sechost/service.c index 011ef5c1a62..e21c543ada9 100644 --- a/dlls/sechost/service.c +++ b/dlls/sechost/service.c @@ -2207,10 +2207,11 @@ BOOL WINAPI I_ScUnregisterDeviceNotification( HDEVNOTIFY handle ) SetLastError( ERROR_INVALID_HANDLE ); ret = FALSE; } - - list_remove( ¬ify->entry ); - free( notify->path ); - free( notify ); + else { + list_remove( ¬ify->entry ); + free( notify->path ); + free( notify ); + } } __EXCEPT_PAGE_FAULT { -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10663