From e9163da19693a6268a83d25ffd4472e8e0590d7d Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Fri, 24 Jul 2020 15:09:08 +0200 Subject: clock: Fix GError double free Let the GError ownership on the async finish method call. --- applets/clock/clock-location-tile.c | 2 -- applets/clock/clock-location.c | 2 -- applets/clock/clock.c | 2 -- applets/clock/set-timezone.c | 1 + 4 files changed, 1 insertion(+), 6 deletions(-) (limited to 'applets') diff --git a/applets/clock/clock-location-tile.c b/applets/clock/clock-location-tile.c index cdcc1ef3..4e0d71a2 100644 --- a/applets/clock/clock-location-tile.c +++ b/applets/clock/clock-location-tile.c @@ -185,8 +185,6 @@ make_current_cb (gpointer data, GError *error) g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL); gtk_window_present (GTK_WINDOW (dialog)); - - g_error_free (error); } } diff --git a/applets/clock/clock-location.c b/applets/clock/clock-location.c index 22ef32be..20c74444 100644 --- a/applets/clock/clock-location.c +++ b/applets/clock/clock-location.c @@ -531,8 +531,6 @@ make_current_cb (gpointer data, GError *error) if (mcdata->callback) mcdata->callback (mcdata->data, error); - else - g_error_free (error); } static void diff --git a/applets/clock/clock.c b/applets/clock/clock.c index 0d313faf..b7c7135f 100644 --- a/applets/clock/clock.c +++ b/applets/clock/clock.c @@ -1692,8 +1692,6 @@ set_time_callback (ClockData *cd, GError *error) g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL); gtk_window_present (GTK_WINDOW (dialog)); - - g_error_free (error); } else update_set_time_button (cd); diff --git a/applets/clock/set-timezone.c b/applets/clock/set-timezone.c index 109ca2ad..844cceec 100644 --- a/applets/clock/set-timezone.c +++ b/applets/clock/set-timezone.c @@ -202,6 +202,7 @@ set_time_notify (GObject *source_object, if (data->callback) data->callback (data->data, NULL); } + free_data (data); } static void -- cgit v1.2.1