user32: Avoid releasing a potentially null pointer.

This commit is contained in:
Alexandre Julliard 2013-02-11 11:45:43 +01:00
parent bdfab8cd88
commit b7bf7f01b3
1 changed files with 2 additions and 2 deletions

View File

@ -180,7 +180,7 @@ void *free_user_handle( HANDLE handle, enum user_obj_type type )
else InterlockedCompareExchangePointer( &user_handles[index], NULL, ptr );
}
SERVER_END_REQ;
release_user_handle_ptr( ptr );
USER_Unlock();
}
return ptr;
}
@ -290,7 +290,7 @@ static void free_window_handle( HWND hwnd )
else InterlockedCompareExchangePointer( &user_handles[index], NULL, ptr );
}
SERVER_END_REQ;
release_user_handle_ptr( ptr );
USER_Unlock();
HeapFree( GetProcessHeap(), 0, ptr );
}
}