diff options
author | Takashi Iwai <tiwai@suse.de> | 2016-03-08 10:49:43 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2016-03-08 10:49:43 +0100 |
commit | 56d94d70398f0fbb1863a03a145db1a86f009a71 (patch) | |
tree | 9e52dc537f8f8359c70b66f5000192bb280b41b9 /net/ipv4/ping.c | |
parent | ALSA: hda - Use snd_hdac namespace prefix for chmap exported APIs (diff) | |
parent | ALSA: hda - Fix unexpected resume through regmap code path (diff) | |
download | linux-56d94d70398f0fbb1863a03a145db1a86f009a71.tar.xz linux-56d94d70398f0fbb1863a03a145db1a86f009a71.zip |
Merge branch 'topic/hda' into for-next
Diffstat (limited to 'net/ipv4/ping.c')
-rw-r--r-- | net/ipv4/ping.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c index c117b21b937d..d3a27165f9cc 100644 --- a/net/ipv4/ping.c +++ b/net/ipv4/ping.c @@ -746,8 +746,10 @@ static int ping_v4_sendmsg(struct sock *sk, struct msghdr *msg, size_t len) if (msg->msg_controllen) { err = ip_cmsg_send(sock_net(sk), msg, &ipc, false); - if (err) + if (unlikely(err)) { + kfree(ipc.opt); return err; + } if (ipc.opt) free = 1; } |