Fixed memory leak in failure case that static analysis found.
parent
7bd7221997
commit
2afa4aeda8
|
@ -193,6 +193,7 @@ GetDisplayMode(_THIS, const void *moderef, CVDisplayLinkRef link, SDL_DisplayMod
|
||||||
break;
|
break;
|
||||||
case 8: /* We don't support palettized modes now */
|
case 8: /* We don't support palettized modes now */
|
||||||
default: /* Totally unrecognizable bit depth. */
|
default: /* Totally unrecognizable bit depth. */
|
||||||
|
SDL_free(data);
|
||||||
return SDL_FALSE;
|
return SDL_FALSE;
|
||||||
}
|
}
|
||||||
mode->w = width;
|
mode->w = width;
|
||||||
|
|
Loading…
Reference in New Issue