Commit b91d0290 authored by Dan Winship's avatar Dan Winship

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).
parent d20ac49d
......@@ -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);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment