diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2011-07-12 12:39:49 +0200 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@gmail.com> | 2011-07-12 12:39:49 +0200 |
commit | 7e608c638b01541619ebdb275f200bef056d0af0 (patch) | |
tree | 78e6324469a4c8fea5b0145fba4cb4958209957c /gtk/spice-pulse.c | |
parent | b82e091a478f9d308d67fb0a716984aa4f7bf47c (diff) |
gtk/pulse: fix memory leak
Diffstat (limited to 'gtk/spice-pulse.c')
-rw-r--r-- | gtk/spice-pulse.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gtk/spice-pulse.c b/gtk/spice-pulse.c index 0483273..5c9fd4c 100644 --- a/gtk/spice-pulse.c +++ b/gtk/spice-pulse.c @@ -794,7 +794,7 @@ SpicePulse *spice_pulse_new(SpiceSession *session, GMainContext *context, { SpicePulse *pulse; spice_pulse *p; - GList *list; + GList *list, *tmp; pulse = g_object_new(SPICE_TYPE_PULSE, NULL); p = SPICE_PULSE_GET_PRIVATE(pulse); @@ -803,8 +803,8 @@ SpicePulse *spice_pulse_new(SpiceSession *session, GMainContext *context, g_signal_connect(session, "channel-new", G_CALLBACK(channel_new), pulse); list = spice_session_get_channels(session); - for (list = g_list_first(list); list != NULL; list = g_list_next(list)) { - channel_new(session, list->data, (gpointer)pulse); + for (tmp = g_list_first(list); tmp != NULL; tmp = g_list_next(tmp)) { + channel_new(session, tmp->data, (gpointer)pulse); } g_list_free(list); |