[Scummvm-cvs-logs] SF.net SVN: scummvm:[49307] scummvm/trunk/engines/scumm/he/resource_he.cpp
eriktorbjorn at users.sourceforge.net
eriktorbjorn at users.sourceforge.net
Sat May 29 10:14:51 CEST 2010
Revision: 49307
http://scummvm.svn.sourceforge.net/scummvm/?rev=49307&view=rev
Author: eriktorbjorn
Date: 2010-05-29 08:14:50 +0000 (Sat, 29 May 2010)
Log Message:
-----------
Fixed potential memory leak found by cppcheck. Though I'm guessing that if this
case happens, we may have bigger problems...
Modified Paths:
--------------
scummvm/trunk/engines/scumm/he/resource_he.cpp
Modified: scummvm/trunk/engines/scumm/he/resource_he.cpp
===================================================================
--- scummvm/trunk/engines/scumm/he/resource_he.cpp 2010-05-29 08:09:47 UTC (rev 49306)
+++ scummvm/trunk/engines/scumm/he/resource_he.cpp 2010-05-29 08:14:50 UTC (rev 49307)
@@ -633,8 +633,10 @@
wr[c].children = fi->first_resource + (FROM_LE_32(dirent[c].offset_to_data) & ~IMAGE_RESOURCE_DATA_IS_DIRECTORY);
/* fill in wr->id, wr->numeric_id */
- if (!decode_pe_resource_id(fi, wr + c, FROM_LE_32(dirent[c].name)))
+ if (!decode_pe_resource_id(fi, wr + c, FROM_LE_32(dirent[c].name))) {
+ free(wr);
return NULL;
+ }
}
return wr;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list