aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2012-08-20 03:28:02 +0300
committerFilippos Karapetis2012-08-20 03:28:02 +0300
commit23db3cd9f225d40ff1900dd806630800ecf54aeb (patch)
treec4a711d580e3d67201592c6f181934ff7ab7e3a5
parentb19ccb9d1edcdf238727f0c3b0a731b2f00e9d3d (diff)
downloadscummvm-rg350-23db3cd9f225d40ff1900dd806630800ecf54aeb.tar.gz
scummvm-rg350-23db3cd9f225d40ff1900dd806630800ecf54aeb.tar.bz2
scummvm-rg350-23db3cd9f225d40ff1900dd806630800ecf54aeb.zip
SAGA: Remove incorrect free() in loadShortenFromStream()
This removes a warning and fixes bug #3558052 - "SAGA: use-after-free warning"
-rw-r--r--engines/saga/shorten.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/engines/saga/shorten.cpp b/engines/saga/shorten.cpp
index 5efc8d1f67..69c27b6a6b 100644
--- a/engines/saga/shorten.cpp
+++ b/engines/saga/shorten.cpp
@@ -519,9 +519,6 @@ byte *loadShortenFromStream(Common::ReadStream &stream, int &size, int &rate, by
if (maxLPC > 0)
free(lpc);
- if (size > 0)
- free(unpackedBuffer);
-
delete gReader;
return unpackedBuffer;
}