Skip to content

Commit

Permalink
Fix memory leak in MQTT (#5311)
Browse files Browse the repository at this point in the history
  • Loading branch information
GUVWAF authored Nov 11, 2024
1 parent 667b4ef commit 9b4c260
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/mqtt/MQTT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,7 @@ void MQTT::onSend(const meshtastic_MeshPacket &mp_encrypted, const meshtastic_Me
LOG_DEBUG("portnum %i message", env->packet->decoded.portnum);
} else {
LOG_DEBUG("nothing, pkt not decrypted");
mqttPool.release(env);
return; // Don't upload a still-encrypted PKI packet if not encryption_enabled
}

Expand Down Expand Up @@ -768,4 +769,4 @@ bool MQTT::isPrivateIpAddress(const char address[])

int octet2Num = atoi(octet2);
return octet2Num >= 16 && octet2Num <= 31;
}
}

0 comments on commit 9b4c260

Please sign in to comment.