mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 16:01:10 +02:00
gui/plugins.cpp: fix memleak in scandir
Origin commit data
------------------
Branch: ni/coolstream
Commit: 37d5e13d43
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2012-05-04 (Fri, 04 May 2012)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -108,6 +108,9 @@ void CPlugins::scanDir(const char *dir)
|
||||
|
||||
int number_of_files = scandir(dir, &namelist, 0, alphasort);
|
||||
|
||||
if(number_of_files < 0)
|
||||
return;
|
||||
|
||||
for (int i = 0; i < number_of_files; i++)
|
||||
{
|
||||
std::string filename;
|
||||
@@ -147,7 +150,9 @@ void CPlugins::scanDir(const char *dir)
|
||||
}
|
||||
}
|
||||
}
|
||||
free(namelist[i]);
|
||||
}
|
||||
free(namelist);
|
||||
}
|
||||
|
||||
void CPlugins::loadPlugins()
|
||||
|
Reference in New Issue
Block a user