summaryrefslogtreecommitdiff
path: root/src/libsystemd
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-02-25 15:29:37 -0500
committerTom Gundersen <teg@jklm.no>2015-02-26 17:31:08 -0500
commit09c41feef3dbbdba36ad7bf3928ba4e29dee79c3 (patch)
tree52882cdfda0cd531ab681e38648202b6078faf58 /src/libsystemd
parentf8a6ca1babe0afea6cd5cc8006077cbe93243b8f (diff)
sd-rtnl: types - fix check for unsupported type
Spotted by Thomas H.P. Andersen <phomes@gmail.com>
Diffstat (limited to 'src/libsystemd')
-rw-r--r--src/libsystemd/sd-rtnl/rtnl-types.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libsystemd/sd-rtnl/rtnl-types.c b/src/libsystemd/sd-rtnl/rtnl-types.c
index 40dee56e98..557dc59455 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;