aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/devlink.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2017-06-20 10:48:44 +0200
committerIngo Molnar <mingo@kernel.org>2017-06-20 10:48:44 +0200
commit2eb0fc9bfe7485fec16030b85ff586e7aaea2b6f (patch)
treeb804e48f8aba794030f3610199b0f20140e6c6a8 /net/core/devlink.c
parentperf/core: Remove unused perf_cgroup_event_cgrp_time() function (diff)
parentLinux 4.12-rc6 (diff)
Merge tag 'v4.12-rc6' into perf/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'net/core/devlink.c')
-rw-r--r--net/core/devlink.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/net/core/devlink.c b/net/core/devlink.c
index b0b87a292e7c..a0adfc31a3fe 100644
--- a/net/core/devlink.c
+++ b/net/core/devlink.c
@@ -1680,8 +1680,10 @@ start_again:
hdr = genlmsg_put(skb, info->snd_portid, info->snd_seq,
&devlink_nl_family, NLM_F_MULTI, cmd);
- if (!hdr)
+ if (!hdr) {
+ nlmsg_free(skb);
return -EMSGSIZE;
+ }
if (devlink_nl_put_handle(skb, devlink))
goto nla_put_failure;
@@ -2098,8 +2100,10 @@ start_again:
hdr = genlmsg_put(skb, info->snd_portid, info->snd_seq,
&devlink_nl_family, NLM_F_MULTI, cmd);
- if (!hdr)
+ if (!hdr) {
+ nlmsg_free(skb);
return -EMSGSIZE;
+ }
if (devlink_nl_put_handle(skb, devlink))
goto nla_put_failure;