changeset 35870:26ad65a4e47d

Free memory allocated for fsHistory[] elements when GUI ends.
author ib
date Fri, 15 Mar 2013 01:50:52 +0000
parents 709d85ff7a0b
children 8f49b68dd955
files gui/app/cfg.c
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/gui/app/cfg.c	Thu Mar 14 21:10:19 2013 +0000
+++ b/gui/app/cfg.c	Fri Mar 15 01:50:52 2013 +0000
@@ -439,9 +439,12 @@
     if (file) {
         unsigned int i;
 
-        for (i = 0; i < FF_ARRAY_ELEMS(fsHistory); i++)
-            if (fsHistory[i])
+        for (i = 0; i < FF_ARRAY_ELEMS(fsHistory); i++) {
+            if (fsHistory[i]) {
                 fprintf(file, "%s\n", fsHistory[i]);
+                free(fsHistory[i]);
+            }
+        }
 
         fclose(file);
     }