revert "net: kcm: fix memory leak in kcm_sendmsg"

In commit c47cc30499 ("net: kcm: fix memory leak in kcm_sendmsg")
I misunderstood the root case of the memory leak and came up with
completely broken fix.

So, simply revert this commit to avoid GPF reported by
syzbot.

Im so sorry for this situation.

Fixes: c47cc30499 ("net: kcm: fix memory leak in kcm_sendmsg")
Reported-by: syzbot+65badd5e74ec62cb67dc@syzkaller.appspotmail.com
Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Pavel Skripkin 2021-06-07 21:46:23 +03:00 committed by David S. Miller
parent aaab3076d7
commit a47c397bb2
1 changed files with 0 additions and 5 deletions

View File

@ -1066,11 +1066,6 @@ out_error:
goto partial_message;
}
if (skb_has_frag_list(head)) {
kfree_skb_list(skb_shinfo(head)->frag_list);
skb_shinfo(head)->frag_list = NULL;
}
if (head != kcm->seq_skb)
kfree_skb(head);