mirror of
https://github.com/meshtastic/firmware.git
synced 2025-02-13 08:01:24 +00:00
fix memory corruption in storeandforward
This commit is contained in:
parent
b7f9064f0d
commit
a5ed607261
@ -227,14 +227,14 @@ void StoreForwardPlugin::sawNodeReport()
|
|||||||
|
|
||||||
MeshPacket *StoreForwardPluginRadio::allocReply()
|
MeshPacket *StoreForwardPluginRadio::allocReply()
|
||||||
{
|
{
|
||||||
//auto reply = allocDataPacket(); // Allocate a packet for sending
|
auto reply = allocDataPacket(); // Allocate a packet for sending
|
||||||
//return reply;
|
return reply; // attn @mc-hamster this code was commented out and was causing memory corruption
|
||||||
}
|
}
|
||||||
|
|
||||||
void StoreForwardPluginRadio::sendPayload(NodeNum dest, bool wantReplies)
|
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->to = dest;
|
||||||
p->decoded.want_response = wantReplies;
|
p->decoded.want_response = wantReplies;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user