chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f8a6ca1
)
sd-rtnl: types - fix check for unsupported type
author
Tom Gundersen
<teg@jklm.no>
Wed, 25 Feb 2015 20:29:37 +0000
(15:29 -0500)
committer
Tom Gundersen
<teg@jklm.no>
Thu, 26 Feb 2015 22:31:08 +0000
(17:31 -0500)
Spotted by Thomas H.P. Andersen <phomes@gmail.com>
src/libsystemd/sd-rtnl/rtnl-types.c
patch
|
blob
|
history
diff --git
a/src/libsystemd/sd-rtnl/rtnl-types.c
b/src/libsystemd/sd-rtnl/rtnl-types.c
index 40dee56e98a03386853485820e9038577a1a38cd..557dc59455c8e5e3af7f9e1394242aa34ddd0836 100644
(file)
--- 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];
return -ENOTSUP;
type_system = &type_system_union->type_systems[protocol];
-
- if (!type_system)
+ if (type_system->max == 0)
return -ENOTSUP;
*ret = type_system;
return -ENOTSUP;
*ret = type_system;