diff options
author | Thomas Haller <thaller@redhat.com> | 2020-07-20 16:11:25 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2020-07-20 16:11:48 +0200 |
commit | 6f29ed9f3f12062fcdf8c37a1177eb13dcda99e5 (patch) | |
tree | 8ded6ad0e88409e9c7dd60a3cb43d525cd4ee5e1 | |
parent | cb4fb0ac06adf0f543fcf4555f16070e77a08b0d (diff) | |
download | NetworkManager-6f29ed9f3f12062fcdf8c37a1177eb13dcda99e5.tar.gz |
device: fix setting %NULL iface in nm_device_update_from_platform_link()
Fixes: f004e7b1a720 ('device: mark ifindex/iface fields of NMDevicePrivate as const')
-rw-r--r-- | src/devices/nm-device.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 22c255ecf6..90ca3eddd5 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -4717,8 +4717,9 @@ nm_device_update_from_platform_link (NMDevice *self, const NMPlatformLink *plink _notify (self, PROP_PATH); } - str = plink ? plink->name : NULL; - if (nm_utils_strdup_reset (&priv->iface_, str)) + if ( plink + && !nm_str_is_empty (plink->name) + && nm_utils_strdup_reset (&priv->iface_, plink->name)) _notify (self, PROP_IFACE); str = plink ? plink->driver : NULL; |