aboutsummaryrefslogtreecommitdiff
path: root/graphics/decoders
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2013-01-24 17:39:16 +0100
committerEinar Johan Trøan Sømåen2013-01-24 17:39:16 +0100
commit58777682feab173ddcbec4ccab5e01be40b7ca29 (patch)
treef6b1f014065b5181b0d3e573760cf477389c8ec9 /graphics/decoders
parent17809d0fb313d9ebae6491d0888432d182c13f30 (diff)
downloadscummvm-rg350-58777682feab173ddcbec4ccab5e01be40b7ca29.tar.gz
scummvm-rg350-58777682feab173ddcbec4ccab5e01be40b7ca29.tar.bz2
scummvm-rg350-58777682feab173ddcbec4ccab5e01be40b7ca29.zip
GRAPHICS: Fix leak in PNG-decoder.
Diffstat (limited to 'graphics/decoders')
-rw-r--r--graphics/decoders/png.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/graphics/decoders/png.cpp b/graphics/decoders/png.cpp
index 4f917b44b1..11e26162eb 100644
--- a/graphics/decoders/png.cpp
+++ b/graphics/decoders/png.cpp
@@ -227,7 +227,7 @@ bool PNGDecoder::loadStream(Common::SeekableReadStream &stream) {
png_read_end(pngPtr, NULL);
// Destroy libpng structures
- png_destroy_read_struct(&pngPtr, &infoPtr, NULL);
+ png_destroy_read_struct(&pngPtr, &infoPtr, &endInfo);
// We no longer need the file stream, thus close it here
_stream = 0;