summaryrefslogtreecommitdiff
path: root/src/progs/dyecmd
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-11-12 00:37:13 +0300
committerAndrei Karas <akaras@inbox.ru>2018-11-12 02:02:30 +0300
commit6f9db38b7fdd7f5bfccf0a53b348db3a76d5851b (patch)
tree2f7bd13b86a7be215c7fac5d5bbd5f0c8d82879a /src/progs/dyecmd
parentcaa6802392ef5bd400d080d3d7778e19f815074c (diff)
downloadmv-6f9db38b7fdd7f5bfccf0a53b348db3a76d5851b.tar.gz
mv-6f9db38b7fdd7f5bfccf0a53b348db3a76d5851b.tar.bz2
mv-6f9db38b7fdd7f5bfccf0a53b348db3a76d5851b.tar.xz
mv-6f9db38b7fdd7f5bfccf0a53b348db3a76d5851b.zip
Fix memory leak in dyecmd on exit.
Diffstat (limited to 'src/progs/dyecmd')
-rw-r--r--src/progs/dyecmd/dyemain.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/progs/dyecmd/dyemain.cpp b/src/progs/dyecmd/dyemain.cpp
index 310ee04a7..6de3ef2fe 100644
--- a/src/progs/dyecmd/dyemain.cpp
+++ b/src/progs/dyecmd/dyemain.cpp
@@ -36,6 +36,8 @@
#include "resources/loaders/imageloader.h"
+#include "resources/resourcemanager/resourcemanager.h"
+
#include "utils/cpu.h"
#include "utils/gettext.h"
#include "utils/pnglib.h"
@@ -120,6 +122,8 @@ int main(int argc, char **argv)
image->getSDLSurface());
PngLib::writePNG(surface, dst);
SDL_FreeSurface(surface);
+ image->decRef();
+ ResourceManager::cleanOrphans(true);
VirtFs::deinit();
return 0;
}