Memory leak within gtkdatabox



I have found a potential memory leak in gtkdatabox. I am using the
gtkdatabox-devel package from Fedora Core 6, version 0.7.0.0-4.
Valgrind reported leaking memory on a call to
gtk_databox_marker_set_label, on inspecting the source code for
gtkdatabox, I found this:

gtkdatabox_marker.c:567
marker->priv->marker_info[index].text = g_strdup (text);

If one calls gtk_databox_marker_set_label several times, the old
string in marker->priv->marker_info[index].text is never free'd, while
a new one is allocated by g_strdup. Over time, the application fails
due to too much memory being used.

-Jim



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]