mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-29 20:50:11 +01:00
dhcp: fix crash in "nm-dhcp-helper" passing NULL to g_dbus_connection_flush_sync()
"connection" variable might be NULL, which fails an assertion in g_dbus_connection_flush_sync(). Consequently, "error_flush" is also NULL which leads to a crash of "nm-dhcp-helper". Reported-by: Jules Maselbas <jmaselbas@zdiv.net> Fixes:240ec7f891('dhcp: implement ACD (address collision detection) for DHCPv4') (cherry picked from commit37e130232d)
This commit is contained in:
parent
e4f5d96d6a
commit
e4cc504af5
1 changed files with 1 additions and 1 deletions
|
|
@ -252,7 +252,7 @@ do_notify:
|
|||
success = FALSE;
|
||||
|
||||
out:
|
||||
if (!g_dbus_connection_flush_sync(connection, NULL, &error_flush)) {
|
||||
if (connection && !g_dbus_connection_flush_sync(connection, NULL, &error_flush)) {
|
||||
_LOGE("could not flush D-Bus connection: %s", error_flush->message);
|
||||
/* if we considered this a success so far, don't fail because of this. */
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue