summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorMatt Johnston <matt@codeconstruct.com.au>2025-07-10 16:55:54 +0800
committerPaolo Abeni <pabeni@redhat.com>2025-07-15 12:08:39 +0200
commit3558ab79a2f22086c040542f4e4e6b005bc28a06 (patch)
treed820a64cd74ad08f9d54b1d6daff3abe89dfb995 /net
parenta8594c956cc9dc6799554a554bc422d1ffd4c46b (diff)
net: mctp: mctp_test_route_extaddr_input cleanup
The sock was not being released. Other than leaking, the stale socket will conflict with subsequent bind() calls in unrelated MCTP tests. Fixes: 46ee16462fed ("net: mctp: test: Add extaddr routing output test") Signed-off-by: Matt Johnston <matt@codeconstruct.com.au> Link: https://patch.msgid.link/20250710-mctp-bind-v4-1-8ec2f6460c56@codeconstruct.com.au Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'net')
-rw-r--r--net/mctp/test/route-test.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/mctp/test/route-test.c b/net/mctp/test/route-test.c
index 7a398f41b621..12811032a269 100644
--- a/net/mctp/test/route-test.c
+++ b/net/mctp/test/route-test.c
@@ -1164,8 +1164,6 @@ static void mctp_test_route_extaddr_input(struct kunit *test)
rc = mctp_dst_input(&dst, skb);
KUNIT_ASSERT_EQ(test, rc, 0);
- mctp_test_dst_release(&dst, &tpq);
-
skb2 = skb_recv_datagram(sock->sk, MSG_DONTWAIT, &rc);
KUNIT_ASSERT_NOT_ERR_OR_NULL(test, skb2);
KUNIT_ASSERT_EQ(test, skb2->len, len);
@@ -1179,8 +1177,8 @@ static void mctp_test_route_extaddr_input(struct kunit *test)
KUNIT_EXPECT_EQ(test, cb2->halen, sizeof(haddr));
KUNIT_EXPECT_MEMEQ(test, cb2->haddr, haddr, sizeof(haddr));
- skb_free_datagram(sock->sk, skb2);
- mctp_test_destroy_dev(dev);
+ kfree_skb(skb2);
+ __mctp_route_test_fini(test, dev, &dst, &tpq, sock);
}
static void mctp_test_route_gw_lookup(struct kunit *test)