mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-20 05:50:44 +01:00
libnm: fix leak and return "failures" from nm_client_load_connections()
Due to this, `nmcli connection load` would also not print a warning about failure to load obviously bogus files: $ nmcli connection load /bogus Note that load is also used to unload files, so if the file name is a possibly valid name for a non-existing file, there is no failure. For example, we get no warning for $ nmcli connection load /etc/NetworkManager/system-connections/bogus Even if currently no such file is loaded, then the operation would still silently succeed, instead of succeeding the first time only. That is because load should be idempotent. [thaller@redhat.com: rewrote commit message] Fixes:4af6219226('libnm: implement nm_client_load_connections_async() by using GDBusConnection directly') https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/794 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/979 (cherry picked from commit2a36f8c2f1)
This commit is contained in:
parent
0d8c2aeb43
commit
b225d9d6bb
1 changed files with 1 additions and 1 deletions
|
|
@ -5904,7 +5904,7 @@ nm_client_load_connections(NMClient * client,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
g_variant_get(ret, "(b^as)", NULL, &failures);
|
||||
g_variant_get(ret, "(b^as)", NULL, failures);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue