summaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
Diffstat (limited to 'net/core')
-rw-r--r--net/core/rtnetlink.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index eeff0b2..8f22549 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)
}
}
- if (!valid)
- goto nla_put_failure;
+ if (!valid) {
+ nla_nest_cancel(skb, mx);
+ return 0;
+ }
return nla_nest_end(skb, mx);
OpenPOWER on IntegriCloud