network: Avoid uninitialised variable
This commit is contained in:
parent
a37f8770e5
commit
b76013bd1d
1 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue