mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-03 10:51:05 +02:00
screensaver.cpp and webtv_setup fix scandir memleak
Origin commit data
------------------
Commit: 448e824971
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2020-01-04 (Sat, 04 Jan 2020)
This commit is contained in:
@@ -214,8 +214,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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -372,7 +372,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