mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-28 20:20:09 +01:00
bond: fix crash in update_connection()
The value read from sysfs can be NULL.
Fixes: 2324410a75
This commit is contained in:
parent
029784b1cc
commit
0683ad5db2
1 changed files with 2 additions and 1 deletions
|
|
@ -169,7 +169,8 @@ update_connection (NMDevice *device, NMConnection *connection)
|
|||
const char *defvalue = nm_setting_bond_get_option_default (s_bond, *options);
|
||||
char *p;
|
||||
|
||||
if (_nm_setting_bond_get_option_type (s_bond, *options) == NM_BOND_OPTION_TYPE_BOTH) {
|
||||
if ( value
|
||||
&& _nm_setting_bond_get_option_type (s_bond, *options) == NM_BOND_OPTION_TYPE_BOTH) {
|
||||
p = strchr (value, ' ');
|
||||
if (p)
|
||||
*p = '\0';
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue