From dbacb05d2a8bd0f8123c4a528e135573dbe5a5c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= Date: Wed, 3 Mar 2010 10:11:11 +0100 Subject: [PATCH] core: fix GErrors pileup --- src/main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main.c b/src/main.c index 5f500c1ac0..7b881b1471 100644 --- a/src/main.c +++ b/src/main.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2004 - 2008 Red Hat, Inc. + * Copyright (C) 2004 - 2010 Red Hat, Inc. * Copyright (C) 2005 - 2008 Novell, Inc. */ @@ -525,6 +525,7 @@ main (int argc, char *argv[]) (error && error->message) ? error->message : "unknown"); g_free (config); config = NULL; + g_clear_error (&error); /* Not a hard failure */ } } @@ -539,6 +540,7 @@ main (int argc, char *argv[]) (error && error->message) ? error->message : "unknown"); g_free (config); config = NULL; + g_clear_error (&error); /* Not a hard failure */ } } @@ -548,14 +550,13 @@ main (int argc, char *argv[]) plugins = plugins ? plugins : g_strdup (conf_plugins); g_free (conf_plugins); - g_clear_error (&error); - /* Parse the state file */ if (!parse_state_file (state_file, &net_enabled, &wifi_enabled, &wwan_enabled, &error)) { g_warning ("State file %s parsing failed: (%d) %s.", state_file, error ? error->code : -1, (error && error->message) ? error->message : "unknown"); + g_clear_error (&error); /* Not a hard failure */ }