mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 09:21:09 +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;
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -372,7 +372,9 @@ void CWebTVSetup::webchannels_auto()
|
||||
{
|
||||
printf("[CWebTVSetup] skipping: %s\n", webchannel_file);
|
||||
}
|
||||
free(filelist[count]);
|
||||
}
|
||||
free(filelist);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user