mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-02 19:20:12 +01:00
core: avoid calling platform code with invalid ifindex (2)
Fixes: 945c904f95
This commit is contained in:
parent
d45eed4437
commit
6ba9f47c94
1 changed files with 2 additions and 0 deletions
|
|
@ -3641,6 +3641,8 @@ device_link_changed (NMDevice *self)
|
|||
priv->device_link_changed_id = 0;
|
||||
|
||||
ifindex = nm_device_get_ifindex (self);
|
||||
if (ifindex <= 0)
|
||||
return G_SOURCE_REMOVE;
|
||||
pllink = nm_platform_link_get (nm_device_get_platform (self), ifindex);
|
||||
if (!pllink)
|
||||
return G_SOURCE_REMOVE;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue