Fixed memory leak when out of memory

main
Sam Lantinga 2022-08-28 17:55:49 -07:00
parent ffbad3617c
commit bac8df4abd
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}