sd-rtnl: types - fix check for unsupported type

Spotted by Thomas H.P. Andersen <phomes@gmail.com>
This commit is contained in:
Tom Gundersen
2015-02-26 17:31:08 -05:00
parent f8a6ca1bab
commit 09c41feef3
+1 -2
View File
@@ -524,8 +524,7 @@ int type_system_union_protocol_get_type_system(const NLTypeSystemUnion *type_sys
return -ENOTSUP;
type_system = &type_system_union->type_systems[protocol];
if (!type_system)
if (type_system->max == 0)
return -ENOTSUP;
*ret = type_system;