diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-09-15 01:11:43 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-09-15 01:11:43 +0300 |
commit | 4206ffda4d2acd238c8f0093345af0431cf8a863 (patch) | |
tree | 637833a1af325eddea5c1f3c1329f0f84355df27 /src | |
parent | 57288890689bfa2c2d35882169a539813be621f1 (diff) | |
download | manaverse-4206ffda4d2acd238c8f0093345af0431cf8a863.tar.gz manaverse-4206ffda4d2acd238c8f0093345af0431cf8a863.tar.bz2 manaverse-4206ffda4d2acd238c8f0093345af0431cf8a863.tar.xz manaverse-4206ffda4d2acd238c8f0093345af0431cf8a863.zip |
fix possible memory leak if image is not image.
Diffstat (limited to 'src')
-rw-r--r-- | src/resources/imagehelper.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/resources/imagehelper.cpp b/src/resources/imagehelper.cpp index c94016ca1..2eb374bd4 100644 --- a/src/resources/imagehelper.cpp +++ b/src/resources/imagehelper.cpp @@ -129,6 +129,7 @@ SDL_Surface *ImageHelper::loadPng(SDL_RWops *const rw) if (!IMG_isPNG(rw)) { logger->log("Error, image is not png"); + SDL_RWclose(rw); return nullptr; } SDL_Surface *const tmpImage = MIMG_LoadPNG_RW(rw); |