From dc1dfcba278f7f29b48dc5b29de6cf362371b120 Mon Sep 17 00:00:00 2001 From: Meep-Eep Date: Wed, 28 Dec 2011 17:51:58 +0000 Subject: [PATCH] Fix a few memory leaks, from Louis Delacroix. git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3711 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/ChangeLog | 2 +- sc2/src/uqm.c | 2 ++ sc2/src/uqm/flash.c | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/sc2/ChangeLog b/sc2/ChangeLog index 1ce865944..d8c96bcb0 100644 --- a/sc2/ChangeLog +++ b/sc2/ChangeLog @@ -1,5 +1,5 @@ Changes towards version 0.8: -- Fix memory leak in mkdirhier(), from Loius Delacroix +- Fix several memory leaks, from Loius Delacroix - Some cleanups / warnings fixes, from Louis Delacroix - Added a free callback function for the values of the key-value pairs in hash tables - SvdB diff --git a/sc2/src/uqm.c b/sc2/src/uqm.c index 857c35961..257d5a92a 100644 --- a/sc2/src/uqm.c +++ b/sc2/src/uqm.c @@ -487,6 +487,8 @@ main (int argc, char *argv[]) UnInitThreadSystem (); mem_uninit (); } + + HFree (options.addons); return EXIT_SUCCESS; } diff --git a/sc2/src/uqm/flash.c b/sc2/src/uqm/flash.c index cececaa74..faf145dfc 100644 --- a/sc2/src/uqm/flash.c +++ b/sc2/src/uqm/flash.c @@ -211,6 +211,7 @@ Flash_terminate (FlashContext *context) Flash_drawFrame (context, context->original); Flash_clearCache (context); + HFree (context->cache); DestroyDrawable (ReleaseDrawable (context->original)); }