projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
tcp/dccp: fix another race at listener dismantle
[firefly-linux-kernel-4.4.55.git]
/
net
/
ipv4
/
raw.c
diff --git
a/net/ipv4/raw.c
b/net/ipv4/raw.c
index bc35f1842512bef8e4d87e76542d7bf11f8946fa..7113bae4e6a0c02726e0e11c33415b6779b7d04b 100644
(file)
--- a/
net/ipv4/raw.c
+++ b/
net/ipv4/raw.c
@@
-547,8
+547,10
@@
static int raw_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
if (msg->msg_controllen) {
err = ip_cmsg_send(net, msg, &ipc, false);
- if (err)
+ if (unlikely(err)) {
+ kfree(ipc.opt);
goto out;
+ }
if (ipc.opt)
free = 1;
}