+5
−3
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
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>