udp: with udp_segment release on error path
authorWillem de Bruijn <willemb@google.com>
Tue, 15 Jan 2019 16:40:02 +0000 (11:40 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 31 Jan 2019 07:14:33 +0000 (08:14 +0100)
commite3fa624ee7aff48d6933d31b50c93b77e54ef583
treec4d4142c3136e0610af71f3215bc17b67eec248f
parent84bf74307c881222a3387497cff896f60ea6b44f
udp: with udp_segment release on error path

[ Upstream commit 0f149c9fec3cd720628ecde83bfc6f64c1e7dcb6 ]

Failure __ip_append_data triggers udp_flush_pending_frames, but these
tests happen later. The skb must be freed directly.

Fixes: bec1f6f697362 ("udp: generate gso with UDP_SEGMENT")
Reported-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv4/udp.c
net/ipv6/udp.c