From a5ed6072612fae716336024d0b75ad46b89870de Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Sat, 13 Mar 2021 08:29:32 +0800 Subject: [PATCH] fix memory corruption in storeandforward --- src/plugins/esp32/StoreForwardPlugin.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/esp32/StoreForwardPlugin.cpp b/src/plugins/esp32/StoreForwardPlugin.cpp index 897a2c94a..7cb2862eb 100644 --- a/src/plugins/esp32/StoreForwardPlugin.cpp +++ b/src/plugins/esp32/StoreForwardPlugin.cpp @@ -227,14 +227,14 @@ void StoreForwardPlugin::sawNodeReport() MeshPacket *StoreForwardPluginRadio::allocReply() { - //auto reply = allocDataPacket(); // Allocate a packet for sending - //return reply; + auto reply = allocDataPacket(); // Allocate a packet for sending + return reply; // attn @mc-hamster this code was commented out and was causing memory corruption } void StoreForwardPluginRadio::sendPayload(NodeNum dest, bool wantReplies) { - MeshPacket *p = this->allocReply(); /* + MeshPacket *p = this->allocReply(); // attn @mc-hamster, I moved inside the commented block to prevent leaking memory p->to = dest; p->decoded.want_response = wantReplies;