mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-08 22:22:05 +00:00
Fix memory leak in MQTT (#5311)
This commit is contained in:
parent
667b4ef0f2
commit
9b4c260a92
@ -580,6 +580,7 @@ void MQTT::onSend(const meshtastic_MeshPacket &mp_encrypted, const meshtastic_Me
|
|||||||
LOG_DEBUG("portnum %i message", env->packet->decoded.portnum);
|
LOG_DEBUG("portnum %i message", env->packet->decoded.portnum);
|
||||||
} else {
|
} else {
|
||||||
LOG_DEBUG("nothing, pkt not decrypted");
|
LOG_DEBUG("nothing, pkt not decrypted");
|
||||||
|
mqttPool.release(env);
|
||||||
return; // Don't upload a still-encrypted PKI packet if not encryption_enabled
|
return; // Don't upload a still-encrypted PKI packet if not encryption_enabled
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -768,4 +769,4 @@ bool MQTT::isPrivateIpAddress(const char address[])
|
|||||||
|
|
||||||
int octet2Num = atoi(octet2);
|
int octet2Num = atoi(octet2);
|
||||||
return octet2Num >= 16 && octet2Num <= 31;
|
return octet2Num >= 16 && octet2Num <= 31;
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user