diff options
author | Richard Hughes <richard@hughsie.com> | 2015-10-13 16:34:45 +0100 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2015-10-13 16:34:45 +0100 |
commit | d1c8abfd482310fdb3bdbb7464216f7f61e221b7 (patch) | |
tree | ed187e90bf829b8190fd312f53ede2b6a2d852aa /client/cd-util.c | |
parent | 67ba1c8ec83cbc8f9776cbbf6f0dc7c50897e565 (diff) | |
download | colord-d1c8abfd482310fdb3bdbb7464216f7f61e221b7.tar.gz |
Add g_autoptr() defines for cd_color*
Diffstat (limited to 'client/cd-util.c')
-rw-r--r-- | client/cd-util.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/client/cd-util.c b/client/cd-util.c index e9e31b0..e3c46e1 100644 --- a/client/cd-util.c +++ b/client/cd-util.c @@ -1066,7 +1066,6 @@ cd_util_sensor_lock (CdUtilPrivate *priv, gchar **values, GError **error) static gboolean cd_util_get_sensor_reading (CdUtilPrivate *priv, gchar **values, GError **error) { - CdColorXYZ *xyz; CdSensorCap cap; CdSensorCap cap_tmp = CD_SENSOR_CAP_UNKNOWN; CdSensor *sensor; @@ -1097,6 +1096,7 @@ cd_util_get_sensor_reading (CdUtilPrivate *priv, gchar **values, GError **error) } cap = cd_sensor_cap_from_string (values[0]); for (i = 0; i < array->len; i++) { + g_autoptr(CdColorXYZ) xyz = NULL; sensor = g_ptr_array_index (array, i); if (!cd_sensor_connect_sync (sensor, NULL, error)) @@ -1164,7 +1164,6 @@ cd_util_get_sensor_reading (CdUtilPrivate *priv, gchar **values, GError **error) g_print ("%s XYZ : %f, %f, %f\n", _("Color"), xyz->X, xyz->Y, xyz->Z); - cd_color_xyz_free (xyz); } /* unlock */ |