mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-06 10:50:14 +01:00
cli: fix a possible crash when casting NULL using NM_CONNECTION (rh #1011942)
https://bugzilla.redhat.com/show_bug.cgi?id=1011942
This commit is contained in:
parent
cbe261caa2
commit
b2ff06fc12
1 changed files with 7 additions and 2 deletions
|
|
@ -5512,7 +5512,10 @@ property_edit_submenu (NmCli *nmc,
|
|||
char *cmd_property_arg;
|
||||
|
||||
/* Connection is dirty? (not saved or differs from the saved) */
|
||||
dirty = !nm_connection_compare (connection, NM_CONNECTION (rem_con), NM_SETTING_COMPARE_FLAG_EXACT);
|
||||
dirty = !nm_connection_compare (connection,
|
||||
rem_con ? NM_CONNECTION (rem_con) : NULL,
|
||||
NM_SETTING_COMPARE_FLAG_EXACT);
|
||||
|
||||
if (nmc->editor_status_line)
|
||||
editor_show_status_line (connection, dirty);
|
||||
|
||||
|
|
@ -5891,7 +5894,9 @@ editor_menu_main (NmCli *nmc, NMConnection *connection, const char *connection_t
|
|||
nm_connection_get_uuid (connection));
|
||||
|
||||
/* Connection is dirty? (not saved or differs from the saved) */
|
||||
dirty = !nm_connection_compare (connection, NM_CONNECTION (rem_con), NM_SETTING_COMPARE_FLAG_EXACT);
|
||||
dirty = !nm_connection_compare (connection,
|
||||
rem_con ? NM_CONNECTION (rem_con) : NULL,
|
||||
NM_SETTING_COMPARE_FLAG_EXACT);
|
||||
if (nmc->editor_status_line)
|
||||
editor_show_status_line (connection, dirty);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue