From 839553a7d9e1155931c88633be412c7c602f3489 Mon Sep 17 00:00:00 2001 From: Robert Lubos Date: Thu, 30 Nov 2023 13:49:50 +0100 Subject: [PATCH] net: shell: ping: Fix double packet unref in ping reply handler This was somehow missed, but since ICMP rework, message handlers should not dereference the packet, as it's done by the ICMP lib. Signed-off-by: Robert Lubos --- subsys/net/lib/shell/ping.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/subsys/net/lib/shell/ping.c b/subsys/net/lib/shell/ping.c index 8b52df110b..b31f6f686f 100644 --- a/subsys/net/lib/shell/ping.c +++ b/subsys/net/lib/shell/ping.c @@ -104,7 +104,6 @@ static int handle_ipv6_echo_reply(struct net_icmp_ctx *ctx, ping_done(&ping_ctx); } - net_pkt_unref(pkt); return 0; } #else @@ -179,7 +178,6 @@ static int handle_ipv4_echo_reply(struct net_icmp_ctx *ctx, ping_done(&ping_ctx); } - net_pkt_unref(pkt); return 0; } #else