From 001a33da423f93e23af623018fd789e2af543082 Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Fri, 13 Dec 2013 09:44:19 +0100 Subject: Fix memory leak --- bin/gui/control.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/gui/control.c b/bin/gui/control.c index dd05be4..007ae27 100644 --- a/bin/gui/control.c +++ b/bin/gui/control.c @@ -396,6 +396,7 @@ on_motion_notify (GtkWidget *event_box, GdkEventMotion *event, ThreadData *data) if ((data->state != RUNNING) || ((data->ev_x >= 0 && data->ev_y >= 0) && (data->ev_y <= data->display_height && data->ev_x <= data->display_width))) { gpointer *buffer; GString *string; + buffer = uca_ring_buffer_get_current_pointer (data->buffer); string = g_string_new_len (NULL, 32); gint i = (data->display_y / data->zoom_factor) * data->width + data->display_x / data->zoom_factor; @@ -418,6 +419,8 @@ on_motion_notify (GtkWidget *event_box, GdkEventMotion *event, ThreadData *data) g_string_printf (string, "y = %i", data->display_y); gtk_label_set_text (data->y_label, string->str); + + g_string_free (string, TRUE); } } -- cgit v1.2.3