summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2016-11-21 14:29:38 +0000
committerRichard Hughes <richard@hughsie.com>2016-11-21 14:29:41 +0000
commit16457f37efc50d4568932a250d4c0ae95baed709 (patch)
tree1480dd295988e2ae6a4515ae6a20319256a5ec7e
parent570e24d6a3c5252bc5b8ba548d3fc47c7b134617 (diff)
downloadcolord-16457f37efc50d4568932a250d4c0ae95baed709.tar.gz
Check the parsed context arguments in the session helper
Found by Coverity.
-rw-r--r--contrib/session-helper/cd-main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/contrib/session-helper/cd-main.c b/contrib/session-helper/cd-main.c
index c5cd59b..99ab3b0 100644
--- a/contrib/session-helper/cd-main.c
+++ b/contrib/session-helper/cd-main.c
@@ -2020,7 +2020,11 @@ main (int argc, char *argv[])
g_option_context_add_main_entries (context, options, NULL);
g_option_context_add_group (context, cd_debug_get_option_group ());
g_option_context_set_summary (context, "Color Management D-Bus Service");
- g_option_context_parse (context, &argc, &argv, NULL);
+ if (!g_option_context_parse (context, &argc, &argv, &error)) {
+ g_warning ("CdMain: failed to parse arguemnts: %s",
+ error->message);
+ goto out;
+ }
g_option_context_free (context);
/* load introspection from file */