mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-18 15:51:44 +00:00
Fixed memory leak when out of memory
This commit is contained in:
@@ -331,6 +331,7 @@ MaybeAddDevice(const char *path)
|
||||
|
||||
item = (SDL_joylist_item *) SDL_calloc(1, sizeof (SDL_joylist_item));
|
||||
if (item == NULL) {
|
||||
SDL_free(name);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user