summaryrefslogtreecommitdiff
path: root/net/core/devlink.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2017-06-21 09:07:52 +0200
committerThomas Gleixner <tglx@linutronix.de>2017-06-21 09:07:52 +0200
commitf0cd9ae5d0df8668e76359a3e0e99856aa9c53b9 (patch)
tree84d3297b16fa7e373f2eabef56cd12ae5a9b8a29 /net/core/devlink.c
parent098b0e01a91c42aaaf0425605cd126b03fcb0bcf (diff)
parent8e6cec1c7c5afa489687c90be15d6ed82c742975 (diff)
Merge branch 'timers/urgent' into timers/core
Pick up dependent changes.
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;