mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-11 03:34:05 +02:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user