diff options
author | Roi Dayan <roid@nvidia.com> | 2022-11-04 15:06:04 +0200 |
---|---|---|
committer | Simon Horman <simon.horman@corigine.com> | 2022-11-07 05:41:40 -0500 |
commit | 6ccf8efffccbacd1d7caacbde37f6999a66b3867 (patch) | |
tree | c850342bf3993f421674b5e4b7671d2f0804847e /lib | |
parent | d77f93f363b7bb68186b432f579855b8a837d64e (diff) | |
download | openvswitch-6ccf8efffccbacd1d7caacbde37f6999a66b3867.tar.gz |
tc: Fix coverity dereference null return value
CID 550702 (#1 of 1): Dereference null return value (NULL_RETURNS)
7. dereference: Dereferencing a pointer that might be NULL ex_type when calling nl_attr_get_u16.
Signed-off-by: Roi Dayan <roid@nvidia.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/tc.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1087,6 +1087,10 @@ nl_parse_act_pedit(struct nlattr *options, struct tc_flower *flower) } ex_type = nl_attr_find_nested(nla, TCA_PEDIT_KEY_EX_HTYPE); + if (!ex_type) { + return EOPNOTSUPP; + } + type = nl_attr_get_u16(ex_type); err = csum_update_flag(flower, type); |