[Scummvm-cvs-logs] SF.net SVN: scummvm:[44543] scummvm/trunk/engines/saga/resource_hrs.cpp
eriktorbjorn at users.sourceforge.net
eriktorbjorn at users.sourceforge.net
Fri Oct 2 20:38:52 CEST 2009
Revision: 44543
http://scummvm.svn.sourceforge.net/scummvm/?rev=44543&view=rev
Author: eriktorbjorn
Date: 2009-10-02 18:38:52 +0000 (Fri, 02 Oct 2009)
Log Message:
-----------
Fixed cppcheck warnings about mismatching allocation/deallocation.
Modified Paths:
--------------
scummvm/trunk/engines/saga/resource_hrs.cpp
Modified: scummvm/trunk/engines/saga/resource_hrs.cpp
===================================================================
--- scummvm/trunk/engines/saga/resource_hrs.cpp 2009-10-02 17:50:56 UTC (rev 44542)
+++ scummvm/trunk/engines/saga/resource_hrs.cpp 2009-10-02 18:38:52 UTC (rev 44543)
@@ -63,7 +63,7 @@
// Check if the file is valid
if (origin->id != MKID_BE('HRES')) { // header
- free(origin);
+ delete origin;
return false;
}
@@ -77,7 +77,7 @@
context->table = (ResourceData *) calloc(tableSize / resourceSize, sizeof(*context->table));
if (context->categories == NULL || context->table == NULL) {
- free(origin);
+ delete origin;
return false;
}
@@ -99,7 +99,7 @@
context->count = tableSize / resourceSize;
- free(origin);
+ delete origin;
return true;
}
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