diff --git a/src/gui/screensaver.cpp b/src/gui/screensaver.cpp index 237b3936f..be3ddf7d7 100644 --- a/src/gui/screensaver.cpp +++ b/src/gui/screensaver.cpp @@ -197,8 +197,14 @@ bool CScreenSaver::ReadDir() { struct dirent **coverlist; int n = scandir(COVERDIR_TMP, &coverlist, 0, alphasort); - if (n > 2) // we always have the "." and ".." entrys + if (n > 2){ // we always have the "." and ".." entrys show_audiocover = true; + for (int i = 0; i < n; i++) + { + free(coverlist[i]); + } + free(coverlist); + } } } diff --git a/src/gui/webtv_setup.cpp b/src/gui/webtv_setup.cpp index 38cf66dde..3d9648511 100644 --- a/src/gui/webtv_setup.cpp +++ b/src/gui/webtv_setup.cpp @@ -375,7 +375,9 @@ void CWebTVSetup::webchannels_auto() { printf("[CWebTVSetup] skipping: %s\n", webchannel_file); } + free(filelist[count]); } + free(filelist); } } }