diff options
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/rtnetlink.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index eeff0b23e944..8f225499e32e 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c | |||
@@ -202,8 +202,10 @@ int rtnetlink_put_metrics(struct sk_buff *skb, u32 *metrics) | |||
202 | } | 202 | } |
203 | } | 203 | } |
204 | 204 | ||
205 | if (!valid) | 205 | if (!valid) { |
206 | goto nla_put_failure; | 206 | nla_nest_cancel(skb, mx); |
207 | return 0; | ||
208 | } | ||
207 | 209 | ||
208 | return nla_nest_end(skb, mx); | 210 | return nla_nest_end(skb, mx); |
209 | 211 | ||