Re: [PATCH] sctp: fix dst refcnt leak in sctp_v6_get_dst()

2018-02-05 Thread David Miller
From: Alexey Kodanev Date: Mon, 5 Feb 2018 15:10:35 +0300 > When going through the bind address list in sctp_v6_get_dst() and > the previously found address is better ('matchlen > bmatchlen'), > the code continues to the next iteration without releasing currently > held destination. > > Fix it

Re: [PATCH] sctp: fix dst refcnt leak in sctp_v6_get_dst()

2018-02-05 Thread Marcelo Ricardo Leitner
On Mon, Feb 05, 2018 at 03:10:35PM +0300, Alexey Kodanev wrote: > When going through the bind address list in sctp_v6_get_dst() and > the previously found address is better ('matchlen > bmatchlen'), > the code continues to the next iteration without releasing currently > held destination. > > Fix

Re: [PATCH] sctp: fix dst refcnt leak in sctp_v6_get_dst()

2018-02-05 Thread Neil Horman
On Mon, Feb 05, 2018 at 03:10:35PM +0300, Alexey Kodanev wrote: > When going through the bind address list in sctp_v6_get_dst() and > the previously found address is better ('matchlen > bmatchlen'), > the code continues to the next iteration without releasing currently > held destination. > > Fix

[PATCH] sctp: fix dst refcnt leak in sctp_v6_get_dst()

2018-02-05 Thread Alexey Kodanev
When going through the bind address list in sctp_v6_get_dst() and the previously found address is better ('matchlen > bmatchlen'), the code continues to the next iteration without releasing currently held destination. Fix it by releasing 'bdst' before continue to the next iteration, and instead of