diff --git a/src/mesh/ReliableRouter.cpp b/src/mesh/ReliableRouter.cpp index 8000926f3..3d07ff77e 100644 --- a/src/mesh/ReliableRouter.cpp +++ b/src/mesh/ReliableRouter.cpp @@ -148,7 +148,11 @@ bool ReliableRouter::stopRetransmission(GlobalPacketId key) if (old) { auto numErased = pending.erase(key); assert(numErased == 1); + // remove the 'original' (identified by originator and packet->id) from the txqueue and free it cancelSending(getFrom(old->packet), old->packet->id); + // now free the pooled copy for retransmission too. tryfix for #2228 + if (old->packet) + packetPool.release(old->packet); return true; } else return false;