[MPlayer-cvslog] r35964 - trunk/gui/app/cfg.c

ib subversion at mplayerhq.hu
Fri Mar 15 02:50:52 CET 2013


Author: ib
Date: Fri Mar 15 02:50:52 2013
New Revision: 35964

Log:
Free memory allocated for fsHistory[] elements when GUI ends.

Modified:
   trunk/gui/app/cfg.c

Modified: trunk/gui/app/cfg.c
==============================================================================
--- trunk/gui/app/cfg.c	Thu Mar 14 22:10:19 2013	(r35963)
+++ trunk/gui/app/cfg.c	Fri Mar 15 02:50:52 2013	(r35964)
@@ -439,9 +439,12 @@ void cfg_write(void)
     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);
     }


More information about the MPlayer-cvslog mailing list