Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d82f0f1f authored by Marcelo Ricardo Leitner's avatar Marcelo Ricardo Leitner Committed by David S. Miller
Browse files

sctp: fix dst leak



Commit 0ca50d12 failed to release the reference to dst entries that
it decided to skip.

Fixes: 0ca50d12 ("sctp: fix src address selection if using secondary addresses")
Signed-off-by: default avatarMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4548a697
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -511,8 +511,10 @@ static void sctp_v4_get_dst(struct sctp_transport *t, union sctp_addr *saddr,
		 */
		odev = __ip_dev_find(sock_net(sk), laddr->a.v4.sin_addr.s_addr,
				     false);
		if (!odev || odev->ifindex != fl4->flowi4_oif)
		if (!odev || odev->ifindex != fl4->flowi4_oif) {
			dst_release(&rt->dst);
			continue;
		}

		dst = &rt->dst;
		break;