mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 08:21:12 +02:00
audioplayer.cpp fix scandir memleak
This commit is contained in:
@@ -2918,10 +2918,11 @@ void CAudioPlayerGui::cleanupCovers()
|
||||
while (n--)
|
||||
{
|
||||
const char *coverfile = coverlist[n]->d_name;
|
||||
if (strcmp(coverfile, ".") == 0 || strcmp(coverfile, "..") == 0)
|
||||
continue;
|
||||
if (strcmp(coverfile, ".") != 0 && strcmp(coverfile, "..") != 0)
|
||||
{
|
||||
printf("[audioplayer] removing cover %s/%s\n", COVERDIR_TMP, coverfile);
|
||||
unlink(((std::string)COVERDIR_TMP + "/" + coverfile).c_str());
|
||||
}
|
||||
free(coverlist[n]);
|
||||
}
|
||||
free(coverlist);
|
||||
|
Reference in New Issue
Block a user