37da78919a679a632eea29f4b3d6d1a4cbbd84fb
free() calls before early returns in MQTT::onReceive (#5439)
This fix addresses memory leaks in the `MQTT::onReceive` function by ensuring that dynamically allocated resources (`e.channel_id`, `e.gateway_id` and `e.packet`) are properly freed before each early return. Previously, these resources were only freed at the end of the function, leaving them unhandled in certain exit paths. Adding the missing `free()` calls prevents memory leaks and ensures proper resource cleanup in all scenarios.
Meshtastic Firmware
Overview
This repository contains the device firmware for the Meshtastic project.
Stats
Description
This repository contains the official firmware for Meshtastic, an open-source, off-grid mesh communication system.
Languages
C++
67.3%
C
30.6%
Python
1%
Batchfile
0.4%
Shell
0.4%
Other
0.2%