summaryrefslogtreecommitdiff
path: root/lib/colord
diff options
context:
space:
mode:
Diffstat (limited to 'lib/colord')
-rw-r--r--lib/colord/cd-client.c2
-rw-r--r--lib/colord/cd-icc-store.c6
-rw-r--r--lib/colord/cd-icc.c10
-rw-r--r--lib/colord/cd-it8.c4
4 files changed, 11 insertions, 11 deletions
diff --git a/lib/colord/cd-client.c b/lib/colord/cd-client.c
index 10e5270..5fc4f73 100644
--- a/lib/colord/cd-client.c
+++ b/lib/colord/cd-client.c
@@ -1082,7 +1082,7 @@ cd_client_import_profile_query_info_cb (GObject *source_object,
const gchar *type;
_cleanup_error_free_ GError *error = NULL;
_cleanup_free_ gchar *filename = NULL;
- _cleanup_object_unref_ GFileInfo *info;
+ _cleanup_object_unref_ GFileInfo *info = NULL;
/* get the file info */
filename = g_file_get_path (helper->dest);
diff --git a/lib/colord/cd-icc-store.c b/lib/colord/cd-icc-store.c
index 3be642e..c902a72 100644
--- a/lib/colord/cd-icc-store.c
+++ b/lib/colord/cd-icc-store.c
@@ -195,8 +195,8 @@ cd_icc_store_add_icc (CdIccStore *store, GFile *file, GError **error)
{
CdIccStorePrivate *priv = store->priv;
_cleanup_bytes_unref_ GBytes *data = NULL;
- _cleanup_free_ gchar *filename;
- _cleanup_object_unref_ CdIcc *icc;
+ _cleanup_free_ gchar *filename = NULL;
+ _cleanup_object_unref_ CdIcc *icc = NULL;
_cleanup_object_unref_ CdIcc *icc_tmp = NULL;
/* use the GResource cache if available */
@@ -271,7 +271,7 @@ cd_icc_store_created_query_info_cb (GObject *source_object,
gboolean ret;
_cleanup_error_free_ GError *error = NULL;
_cleanup_free_ gchar *path = NULL;
- _cleanup_object_unref_ GFileInfo *info;
+ _cleanup_object_unref_ GFileInfo *info = NULL;
_cleanup_object_unref_ GFile *parent = NULL;
info = g_file_query_info_finish (file, res, NULL);
diff --git a/lib/colord/cd-icc.c b/lib/colord/cd-icc.c
index 477c086..1eedf9e 100644
--- a/lib/colord/cd-icc.c
+++ b/lib/colord/cd-icc.c
@@ -292,7 +292,7 @@ cd_icc_to_string (CdIcc *icc)
/* date and time */
created = cd_icc_get_created (icc);
if (created != NULL) {
- _cleanup_free_ gchar *created_str;
+ _cleanup_free_ gchar *created_str = NULL;
created_str = g_date_time_format (created, "%F, %T");
g_string_append_printf (str, " Date, Time\t= %s\n", created_str);
g_date_time_unref (created);
@@ -548,8 +548,8 @@ cd_icc_to_string (CdIcc *icc)
for (entry = cmsDictGetEntryList (dict);
entry != NULL;
entry = cmsDictNextEntry (entry)) {
- _cleanup_free_ gchar *ascii_name;
- _cleanup_free_ gchar *ascii_value;
+ _cleanup_free_ gchar *ascii_name = NULL;
+ _cleanup_free_ gchar *ascii_value = NULL;
/* convert from wchar_t to UTF-8 */
ascii_name = g_ucs4_to_utf8 ((gunichar *) entry->Name, -1,
@@ -604,7 +604,7 @@ cd_icc_to_string (CdIcc *icc)
continue;
}
for (j = 0; j < tmp; j++) {
- _cleanup_string_free_ GString *string;
+ _cleanup_string_free_ GString *string = NULL;
/* parse title */
string = g_string_new ("");
@@ -1438,7 +1438,7 @@ cd_util_write_tag_localized (CdIcc *icc,
const gchar *value;
gboolean ret = TRUE;
guint i;
- _cleanup_list_free_ GList *keys;
+ _cleanup_list_free_ GList *keys = NULL;
_cleanup_ptrarray_unref_ GPtrArray *array = NULL;
/* convert all the hash entries into CdMluObject's */
diff --git a/lib/colord/cd-it8.c b/lib/colord/cd-it8.c
index 269229d..aba59f2 100644
--- a/lib/colord/cd-it8.c
+++ b/lib/colord/cd-it8.c
@@ -1251,7 +1251,7 @@ cd_it8_save_to_file_cmf (CdIt8 *it8, cmsHANDLE it8_lcms, GError **error)
/* set DATA_FORMAT (using an ID if there are more than one spectra */
spectrum = g_ptr_array_index (it8->priv->array_spectra, 0);
for (i = 0; i < spectral_bands; i++) {
- _cleanup_free_ gchar *label;
+ _cleanup_free_ gchar *label = NULL;
label = g_strdup_printf ("SPEC_%.0f",
cd_spectrum_get_wavelength (spectrum, i));
cmsIT8SetDataFormat (it8_lcms, i, label);
@@ -1334,7 +1334,7 @@ cd_it8_save_to_file_ccss_sp (CdIt8 *it8, cmsHANDLE it8_lcms, GError **error)
cmsIT8SetDataFormat (it8_lcms, 0, "SAMPLE_ID");
spectrum = g_ptr_array_index (it8->priv->array_spectra, 0);
for (i = 0; i < spectral_bands; i++) {
- _cleanup_free_ gchar *label;
+ _cleanup_free_ gchar *label = NULL;
/* there are more spectral bands than integers between the
* start and stop wavelengths */
if ((cd_spectrum_get_end (spectrum) -