mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-28 21:30:10 +01:00
libnm-util: fix possible crash when IP method is NULL
This commit is contained in:
parent
7967a6524a
commit
b40e5f4aa9
2 changed files with 2 additions and 2 deletions
|
|
@ -774,7 +774,7 @@ verify (NMSetting *setting, GSList *all_settings, GError **error)
|
|||
if (list) {
|
||||
NMSettingIP6Config *s_ip6 = g_slist_nth_data (list, 0);
|
||||
if ( s_ip6
|
||||
&& !strcmp (nm_setting_ip6_config_get_method (s_ip6), NM_SETTING_IP6_CONFIG_METHOD_IGNORE)) {
|
||||
&& !g_strcmp0 (nm_setting_ip6_config_get_method (s_ip6), NM_SETTING_IP6_CONFIG_METHOD_IGNORE)) {
|
||||
g_set_error (error,
|
||||
NM_SETTING_IP4_CONFIG_ERROR,
|
||||
NM_SETTING_IP4_CONFIG_ERROR_INVALID_PROPERTY,
|
||||
|
|
|
|||
|
|
@ -758,7 +758,7 @@ verify (NMSetting *setting, GSList *all_settings, GError **error)
|
|||
if (list) {
|
||||
NMSettingIP4Config *s_ip4 = g_slist_nth_data (list, 0);
|
||||
if ( s_ip4
|
||||
&& !strcmp (nm_setting_ip4_config_get_method (s_ip4), NM_SETTING_IP4_CONFIG_METHOD_DISABLED)) {
|
||||
&& !g_strcmp0 (nm_setting_ip4_config_get_method (s_ip4), NM_SETTING_IP4_CONFIG_METHOD_DISABLED)) {
|
||||
g_set_error (error,
|
||||
NM_SETTING_IP6_CONFIG_ERROR,
|
||||
NM_SETTING_IP6_CONFIG_ERROR_INVALID_PROPERTY,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue