From: Tom Gundersen Date: Wed, 25 Feb 2015 20:29:37 +0000 (-0500) Subject: sd-rtnl: types - fix check for unsupported type X-Git-Tag: v219.0~554 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=09c41feef3dbbdba36ad7bf3928ba4e29dee79c3 sd-rtnl: types - fix check for unsupported type Spotted by Thomas H.P. Andersen --- diff --git a/src/libsystemd/sd-rtnl/rtnl-types.c b/src/libsystemd/sd-rtnl/rtnl-types.c index 40dee56e9..557dc5945 100644 --- a/src/libsystemd/sd-rtnl/rtnl-types.c +++ b/src/libsystemd/sd-rtnl/rtnl-types.c @@ -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;