mirror of https://github.com/libsdl-org/SDL.git
Removing Double-free Issue
This commit is contained in:
parent
5c79f4cae1
commit
057c3602e9
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue