gdbusserver: Fix a potential g_object_unref(NULL) call

This can happen if the hash table lookup for ‘noncefile’ fails, and
hence the first ‘goto out’ is hit, at which point resolver is still
NULL.

Found with scan-build.

https://bugzilla.gnome.org/show_bug.cgi?id=113075
This commit is contained in:
Philip Withnall 2013-11-26 11:08:50 +00:00
parent 44af12aba1
commit c729f416fb

View File

@ -898,7 +898,7 @@ try_tcp (GDBusServer *server,
out:
g_list_free_full (resolved_addresses, g_object_unref);
g_object_unref (resolver);
g_clear_object (&resolver);
return ret;
}