mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-07 11:20:23 +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')
This commit is contained in:
parent
8fd73f2be2
commit
37e130232d
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