aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorTorbjörn Andersson2009-10-02 18:38:52 +0000
committerTorbjörn Andersson2009-10-02 18:38:52 +0000
commit41adc39d2d5ae1691717a778c5874306317cf6f4 (patch)
treeee72c8827cae91cab9fcc48ade7199560c3be7ff /engines
parentf915a46e1f56d54b9b80039d83aa8b2ceb1045ee (diff)
downloadscummvm-rg350-41adc39d2d5ae1691717a778c5874306317cf6f4.tar.gz
scummvm-rg350-41adc39d2d5ae1691717a778c5874306317cf6f4.tar.bz2
scummvm-rg350-41adc39d2d5ae1691717a778c5874306317cf6f4.zip
Fixed cppcheck warnings about mismatching allocation/deallocation.
svn-id: r44543
Diffstat (limited to 'engines')
-rw-r--r--engines/saga/resource_hrs.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/saga/resource_hrs.cpp b/engines/saga/resource_hrs.cpp
index 32d92531d8..9a7b593913 100644
--- a/engines/saga/resource_hrs.cpp
+++ b/engines/saga/resource_hrs.cpp
@@ -63,7 +63,7 @@ bool Resource_HRS::loadResContext_v2(ResourceContext *context, uint32 contextSiz
// Check if the file is valid
if (origin->id != MKID_BE('HRES')) { // header
- free(origin);
+ delete origin;
return false;
}
@@ -77,7 +77,7 @@ bool Resource_HRS::loadResContext_v2(ResourceContext *context, uint32 contextSiz
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 @@ bool Resource_HRS::loadResContext_v2(ResourceContext *context, uint32 contextSiz
context->count = tableSize / resourceSize;
- free(origin);
+ delete origin;
return true;
}