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 <robert.lubos@nordicsemi.no>
This commit is contained in:
Robert Lubos 2023-11-30 13:49:50 +01:00 committed by Henrik Brix Andersen
parent 67082289e1
commit 839553a7d9

View file

@ -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