summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2013-10-30 09:49:57 +0000
committerRichard Hughes <richard@hughsie.com>2013-10-30 09:49:57 +0000
commit68b34cd7b27d459555b5dc5bc4c0f471b65cd8ba (patch)
treef75af96163ae9787724c4335c66ef6eab96860f0
parent795cb4eee6291443c29b04a98b1200ff1a404b55 (diff)
downloadcolord-68b34cd7b27d459555b5dc5bc4c0f471b65cd8ba.tar.gz
Do not print incomplete 'colormgr dump' output when the database is corrupt
Spotted by clang.
-rw-r--r--client/cd-util.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/client/cd-util.c b/client/cd-util.c
index 8af494d..cacba6a 100644
--- a/client/cd-util.c
+++ b/client/cd-util.c
@@ -818,6 +818,8 @@ cd_util_dump (CdUtilPrivate *priv, gchar **values, GError **error)
ret = g_spawn_sync (NULL, (gchar **) argv, NULL,
G_SPAWN_SEARCH_PATH, NULL, NULL,
&mapping_db, NULL, NULL, error);
+ if (!ret)
+ goto out;
g_string_append_printf (str, "mapping-db:\n%s\n", mapping_db);
/* save file */