From d1c8abfd482310fdb3bdbb7464216f7f61e221b7 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Tue, 13 Oct 2015 16:34:45 +0100 Subject: Add g_autoptr() defines for cd_color* --- contrib/session-helper/cd-main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'contrib') diff --git a/contrib/session-helper/cd-main.c b/contrib/session-helper/cd-main.c index 5c8ed07..141efb6 100644 --- a/contrib/session-helper/cd-main.c +++ b/contrib/session-helper/cd-main.c @@ -355,7 +355,7 @@ cd_main_calib_get_sample (CdMainPrivate *priv, CdColorXYZ *xyz, GError **error) { - CdColorXYZ *xyz_tmp; + g_autoptr(CdColorXYZ) xyz_tmp = NULL; xyz_tmp = cd_sensor_get_sample_sync (priv->sensor, priv->device_kind, @@ -364,7 +364,6 @@ cd_main_calib_get_sample (CdMainPrivate *priv, if (xyz_tmp == NULL) return FALSE; cd_color_xyz_copy (xyz_tmp, xyz); - cd_color_xyz_free (xyz_tmp); return TRUE; } -- cgit v1.2.1