From: <ric...@us...> - 2010-08-15 14:06:45
|
Revision: 3746 http://desmume.svn.sourceforge.net/desmume/?rev=3746&view=rev Author: riccardom Date: 2010-08-15 14:06:39 +0000 (Sun, 15 Aug 2010) Log Message: ----------- Don't leak dir on error path. Modified Paths: -------------- trunk/desmume/src/fs-linux.cpp Modified: trunk/desmume/src/fs-linux.cpp =================================================================== --- trunk/desmume/src/fs-linux.cpp 2010-08-15 02:56:14 UTC (rev 3745) +++ trunk/desmume/src/fs-linux.cpp 2010-08-15 14:06:39 UTC (rev 3746) @@ -45,13 +45,16 @@ return NULL; tmp = opendir(path); - if (!tmp) + if (!tmp) { + free(dir); return NULL; + } dir->dir = tmp; e = readdir(tmp); if (!e) { closedir(tmp); + free(dir); return NULL; } strcpy(entry->cFileName, e->d_name); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |