mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-07 09:50:28 +01:00
core: short-circuit nm_device_spec_match_list()
If there are no specs, then the device can't match, so don't call the virtual method (which might do work like building comparison strings even when the list is empty).
This commit is contained in:
parent
d20ac49dc9
commit
b91d029021
1 changed files with 3 additions and 0 deletions
|
|
@ -6347,6 +6347,9 @@ nm_device_spec_match_list (NMDevice *device, const GSList *specs)
|
|||
{
|
||||
g_return_val_if_fail (NM_IS_DEVICE (device), FALSE);
|
||||
|
||||
if (!specs)
|
||||
return FALSE;
|
||||
|
||||
return NM_DEVICE_GET_CLASS (device)->spec_match_list (device, specs);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue