[gnome-control-center] network: Avoid uninitialised variable



commit b76013bd1d9cf72fffd3a16f2e2dde8bf227fbad
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Jun 21 15:36:43 2011 +0100

    network: Avoid uninitialised variable

 panels/network/cc-network-panel.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/panels/network/cc-network-panel.c b/panels/network/cc-network-panel.c
index 4b0c434..c3efc94 100644
--- a/panels/network/cc-network-panel.c
+++ b/panels/network/cc-network-panel.c
@@ -2657,8 +2657,11 @@ get_hostname (void)
         if (error != NULL) {
                 g_warning ("Getting pretty hostname failed: %s", error->message);
                 g_error_free (error);
+                return NULL;
         }
 
+        str = NULL;
+
         if (res != NULL) {
                 g_variant_get (res, "(v)", &inner);
                 str = g_variant_dup_string (inner, NULL);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]