Commit 9d287e7
xfrm: Add error handling when nla_put_u32() returns an error
Error handling is missing when call to nla_put_u32() fails.
Handle the error when the call to nla_put_u32() returns an error.
The error was reported by Coverity Scan.
Report:
CID 1601525: (#1 of 1): Unused value (UNUSED_VALUE)
returned_value: Assigning value from nla_put_u32(skb, XFRMA_SA_PCPU, x->pcpu_num)
to err here, but that stored value is overwritten before it can be used
Fixes: 1ddf991 ("xfrm: Add support for per cpu xfrm state handling.")
Signed-off-by: Everest K.C. <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Reviewed-by: Przemek Kitszel <[email protected]>
Signed-off-by: Steffen Klassert <[email protected]>1 parent af2c4fa commit 9d287e7
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2609 | 2609 | | |
2610 | 2610 | | |
2611 | 2611 | | |
2612 | | - | |
| 2612 | + | |
2613 | 2613 | | |
| 2614 | + | |
| 2615 | + | |
| 2616 | + | |
2614 | 2617 | | |
2615 | 2618 | | |
2616 | 2619 | | |
| |||
0 commit comments