mirror of
https://github.com/encounter/SDL.git
synced 2025-12-09 21:47:44 +00:00
Fixed memory leak in failure case that static analysis found.
This commit is contained in:
@@ -193,6 +193,7 @@ GetDisplayMode(_THIS, const void *moderef, CVDisplayLinkRef link, SDL_DisplayMod
|
||||
break;
|
||||
case 8: /* We don't support palettized modes now */
|
||||
default: /* Totally unrecognizable bit depth. */
|
||||
SDL_free(data);
|
||||
return SDL_FALSE;
|
||||
}
|
||||
mode->w = width;
|
||||
|
||||
Reference in New Issue
Block a user