mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
screensaver.cpp and webtv_setup fix scandir memleak
This commit is contained in:
@@ -197,8 +197,14 @@ bool CScreenSaver::ReadDir()
|
|||||||
{
|
{
|
||||||
struct dirent **coverlist;
|
struct dirent **coverlist;
|
||||||
int n = scandir(COVERDIR_TMP, &coverlist, 0, alphasort);
|
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;
|
show_audiocover = true;
|
||||||
|
for (int i = 0; i < n; i++)
|
||||||
|
{
|
||||||
|
free(coverlist[i]);
|
||||||
|
}
|
||||||
|
free(coverlist);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -375,7 +375,9 @@ void CWebTVSetup::webchannels_auto()
|
|||||||
{
|
{
|
||||||
printf("[CWebTVSetup] skipping: %s\n", webchannel_file);
|
printf("[CWebTVSetup] skipping: %s\n", webchannel_file);
|
||||||
}
|
}
|
||||||
|
free(filelist[count]);
|
||||||
}
|
}
|
||||||
|
free(filelist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user