[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gEDA-dev: Memory leak in timer code for GTK HID (PATCH)
Hi,
Going over some of my DBUS code, I spotted a memory leak in the GTK HID.
The following patch should fix it.
Index: gtkhid-main.c
===================================================================
RCS file: /cvsroot/pcb/pcb/src/hid/gtk/gtkhid-main.c,v
retrieving revision 1.25
diff -U3 -p -r1.25 gtkhid-main.c
--- gtkhid-main.c 14 Nov 2006 05:29:42 -0000 1.25
+++ gtkhid-main.c 30 Nov 2006 23:38:00 -0000
@@ -876,6 +876,7 @@ ghid_stop_timer (hidval timer)
void *ptr = timer.ptr;
gtk_timeout_remove (((GuiTimer *) ptr)->id);
+ g_free( ptr );
}
int
--
Peter Clifton
Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA
Tel: +44 (0)7729 980173 - (No signal in the lab!)
Index: gtkhid-main.c
===================================================================
RCS file: /cvsroot/pcb/pcb/src/hid/gtk/gtkhid-main.c,v
retrieving revision 1.25
diff -U3 -p -r1.25 gtkhid-main.c
--- gtkhid-main.c 14 Nov 2006 05:29:42 -0000 1.25
+++ gtkhid-main.c 30 Nov 2006 23:39:19 -0000
@@ -876,6 +876,7 @@ ghid_stop_timer (hidval timer)
void *ptr = timer.ptr;
gtk_timeout_remove (((GuiTimer *) ptr)->id);
+ g_free( ptr );
}
int
_______________________________________________
geda-dev mailing list
geda-dev@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev