diff options
author | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2013-12-13 09:44:19 +0100 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2013-12-13 09:44:19 +0100 |
commit | 001a33da423f93e23af623018fd789e2af543082 (patch) | |
tree | d3074d5503404f86e0c65c7e4bcf2970fdf0c832 | |
parent | 6d3773ecda3a371877a7b40b0c07167358b8438c (diff) | |
download | uca-001a33da423f93e23af623018fd789e2af543082.tar.gz uca-001a33da423f93e23af623018fd789e2af543082.tar.bz2 uca-001a33da423f93e23af623018fd789e2af543082.tar.xz uca-001a33da423f93e23af623018fd789e2af543082.zip |
Fix memory leak
-rw-r--r-- | bin/gui/control.c | 3 |
1 files changed, 3 insertions, 0 deletions
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); } } |