[patch] memory leak

Ravi Pinjala <[email protected]>
Newsgroups gmane.comp.gnome.apps.gkrellm
Message-ID <[email protected]>
I found a pair of memory leaks in gkrellm while running it under 
valgrind. They're pretty slow leaks, but they can add up after a few 
days/weeks.

Patch is attached.

--Ravi
gkrellm-memleak.patch (text/x-patch, 526 B)
diff -Naur gkrellm-2.3.1/src/clock.c gkrellm-2.3.1-patch/src/clock.c
--- gkrellm-2.3.1/src/clock.c	2007-11-16 11:49:50.000000000 -0600
+++ gkrellm-2.3.1-patch/src/clock.c	2008-03-31 13:46:16.000000000 -0500
@@ -299,6 +299,8 @@
 	gkrellm_decal_text_set_offset(d_cal, (d_cal->w - w) / 2, 0);
 	
 	gkrellm_draw_panel_layers(pcal);
+	
+	g_free(cal_string);
 	}
 
 static void
@@ -396,6 +398,7 @@
 		}
 	gkrellm_draw_decal_markup(pclock, d_clock, clock_string);
 	gkrellm_draw_panel_layers(pclock);
+	g_free(clock_string);
 	}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.