Searched hist:"9783 ccd0f2507cbe3c5ff1cb84bf6ae3a512d17d" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/net/ipv4/ |
H A D | ip_output.c | diff 9783ccd0f2507cbe3c5ff1cb84bf6ae3a512d17d Sun Apr 15 21:16:45 CDT 2018 Gao Feng <gfree.wind@vip.163.com> net: Fix one possible memleak in ip_setup_cork
It would allocate memory in this function when the cork->opt is NULL. But the memory isn't freed if failed in the latter rt check, and return error directly. It causes the memleak if its caller is ip_make_skb which also doesn't free the cork->opt when meet a error.
Now move the rt check ahead to avoid the memleak.
Signed-off-by: Gao Feng <gfree.wind@vip.163.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|