free(3) strdup(3)'ed templates array
authorNikos Ntarmos <ntarmos@cs.uoi.gr>
Thu, 28 May 2009 13:41:48 +0000 (16:41 +0300)
committerBrenden Matthews <brenden@rty.ca>
Fri, 29 May 2009 03:27:55 +0000 (21:27 -0600)
Signed-off-by: Nikos Ntarmos <ntarmos@cs.uoi.gr>
Signed-off-by: Brenden Matthews <brenden@rty.ca>

src/conky.c

index a82c08a..e670cf4 100644 (file)
@@ -6944,6 +6944,7 @@ static void reload_config(void)
 
 static void clean_up(void)
 {
+       int i;
        timed_thread_destroy_registered_threads();
 
        if (info.cpu_usage) {
@@ -6972,6 +6973,12 @@ static void clean_up(void)
 
                XFreeGC(display, window.gc);
                free_fonts();
+               for (i = 0; i < 10; i ++) {
+                       if (template[i]) {
+                               free(template[i]);
+                               template[i] = NULL;
+                       }
+               }
        }
 
 #endif /* X11 */