diff options
author | Torbjörn Andersson | 2009-10-26 06:20:13 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2009-10-26 06:20:13 +0000 |
commit | 994408a770a50cf698eb98e67b7b54d41b9b6a88 (patch) | |
tree | 7db0e12d6a2af8e3832b80d675966f79feacae54 /engines/sci/sfx | |
parent | 463ccc896af1e024784abe65f872e64226fe50ed (diff) | |
download | scummvm-rg350-994408a770a50cf698eb98e67b7b54d41b9b6a88.tar.gz scummvm-rg350-994408a770a50cf698eb98e67b7b54d41b9b6a88.tar.bz2 scummvm-rg350-994408a770a50cf698eb98e67b7b54d41b9b6a88.zip |
Fixed some cppcheck warnings.
svn-id: r45391
Diffstat (limited to 'engines/sci/sfx')
-rw-r--r-- | engines/sci/sfx/softseq/amiga.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/engines/sci/sfx/softseq/amiga.cpp b/engines/sci/sfx/softseq/amiga.cpp index 6094201169..388e5685fd 100644 --- a/engines/sci/sfx/softseq/amiga.cpp +++ b/engines/sci/sfx/softseq/amiga.cpp @@ -413,6 +413,8 @@ static instrument_t *read_instrument(Common::File &file, int *id) { instrument->samples = (int8 *) malloc(size + 1); if (file.read(instrument->samples, size) < (unsigned int)size) { warning("[sfx:seq:amiga] failed to read instrument samples"); + free(instrument->samples); + free(instrument); return NULL; } @@ -427,6 +429,8 @@ static instrument_t *read_instrument(Common::File &file, int *id) { if (seg_size[1] < 0) { warning("[sfx:seq:amiga] invalid looping point"); + free(instrument->samples); + free(instrument); return NULL; } |