mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-06 11:28:15 +00:00
Removing Double-free Issue
This commit is contained in:
@@ -418,10 +418,6 @@ static HCURSOR GetCachedCursor(SDL_Cursor *cursor)
|
|||||||
|
|
||||||
entry = (CachedCursor *)SDL_malloc(sizeof(*entry));
|
entry = (CachedCursor *)SDL_malloc(sizeof(*entry));
|
||||||
if (!entry) {
|
if (!entry) {
|
||||||
if (hcursor) {
|
|
||||||
DestroyCursor(hcursor);
|
|
||||||
}
|
|
||||||
SDL_free(entry);
|
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
entry->cursor = hcursor;
|
entry->cursor = hcursor;
|
||||||
|
Reference in New Issue
Block a user