network: Avoid uninitialised variable

This commit is contained in:
Bastien Nocera 2011-06-21 15:36:43 +01:00
parent a37f8770e5
commit b76013bd1d

View file

@ -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);