Fix memory leak

This commit is contained in:
twinaphex 2017-04-28 21:47:26 +02:00
parent 927ed42498
commit 5c024f1cd8
2 changed files with 7 additions and 2 deletions

View File

@ -3446,6 +3446,8 @@ bool config_save_overrides(int override_type)
free(uint_settings);
if (int_overrides)
free(int_overrides);
if (uint_overrides)
free(uint_overrides);
if (float_settings)
free(float_settings);
if (float_overrides)

View File

@ -981,12 +981,15 @@ static void retroarch_main_init_media(void)
{
settings_t *settings = config_get_ptr();
const char *fullpath = path_get(RARCH_PATH_CONTENT);
bool builtin_imageviewer = settings->bools.multimedia_builtin_imageviewer_enable;
bool builtin_mediaplayer = settings->bools.multimedia_builtin_mediaplayer_enable;
bool builtin_imageviewer = false;
bool builtin_mediaplayer = false;
if (!settings)
return;
builtin_imageviewer = settings->bools.multimedia_builtin_imageviewer_enable;
builtin_mediaplayer = settings->bools.multimedia_builtin_mediaplayer_enable;
if (!builtin_mediaplayer && !builtin_imageviewer)
return;