From 55fb722b0e1d9e7171bd414a638baf82c9d9abaa Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Sun, 4 Jun 2017 21:41:10 -0400 Subject: [PATCH] ipv6: Fix leak in ipv6_gso_segment(). commit e3e86b5119f81e5e2499bea7ea1ebe8ac6aab789 upstream. If ip6_find_1stfragopt() fails and we return an error we have to free up 'segs' because nobody else is going to. Fixes: 2423496af35d ("ipv6: Prevent overrun when parsing v6 header options") Reported-by: Ben Hutchings Signed-off-by: David S. Miller [bwh: Backported to 3.2: adjust filename, context] Signed-off-by: Ben Hutchings --- Reading git-format-patch failed