]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ipv4: fix memory leaks in ip_cmsg_send() callers
authorEric Dumazet <edumazet@google.com>
Thu, 4 Feb 2016 14:23:28 +0000 (06:23 -0800)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 26 May 2016 22:45:22 +0000 (15:45 -0700)
commite2c58e5921bcd15f948dc945cf1e6437639e653a
treed68f8e70ab788a2c9d381b0a52a6d654d002038e
parente67dfebbc3334e87fc3f97a4a073a6a76c0b04d4
ipv4: fix memory leaks in ip_cmsg_send() callers

Orabug: 23330953

[ Upstream commit 919483096bfe75dda338e98d56da91a263746a0a ]

Dmitry reported memory leaks of IP options allocated in
ip_cmsg_send() when/if this function returns an error.

Callers are responsible for the freeing.

Many thanks to Dmitry for the report and diagnostic.

Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
(cherry picked from commit ffe8615cbb6abdbb66b8c8b33a3e7ea06c6662f9)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
net/ipv4/ip_sockglue.c
net/ipv4/ping.c
net/ipv4/raw.c
net/ipv4/udp.c