aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/he
diff options
context:
space:
mode:
authorTorbjörn Andersson2010-01-03 19:37:43 +0000
committerTorbjörn Andersson2010-01-03 19:37:43 +0000
commit72eb9ec9eab5efcb3aa99a962a80423e8c0a3232 (patch)
tree032c9107838aefca6a166465a46fa7318bb82566 /engines/scumm/he
parent910ffb53a0b6c74a965df9a1270cdfc3885252ec (diff)
downloadscummvm-rg350-72eb9ec9eab5efcb3aa99a962a80423e8c0a3232.tar.gz
scummvm-rg350-72eb9ec9eab5efcb3aa99a962a80423e8c0a3232.tar.bz2
scummvm-rg350-72eb9ec9eab5efcb3aa99a962a80423e8c0a3232.zip
Fixed a bunch of cppcheck warnings. Mostly about checking if a pointer is null
before freeing it, which isn't necessary. svn-id: r46941
Diffstat (limited to 'engines/scumm/he')
-rw-r--r--engines/scumm/he/resource_he.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/engines/scumm/he/resource_he.cpp b/engines/scumm/he/resource_he.cpp
index ce29bf0319..824f998def 100644
--- a/engines/scumm/he/resource_he.cpp
+++ b/engines/scumm/he/resource_he.cpp
@@ -983,10 +983,8 @@ int Win32ResExtractor::convertIcons(byte *data, int datasize, byte **cursor, int
}
- if (row != NULL)
- free(row);
- if (palette != NULL)
- free(palette);
+ free(row);
+ free(palette);
if (image_data != NULL) {
free(image_data);
free(mask_data);
@@ -995,10 +993,8 @@ int Win32ResExtractor::convertIcons(byte *data, int datasize, byte **cursor, int
local_cleanup:
- if (row != NULL)
- free(row);
- if (palette != NULL)
- free(palette);
+ free(row);
+ free(palette);
if (image_data != NULL) {
free(image_data);
free(mask_data);