mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-29 11:01:15 +00:00
fix leak
This commit is contained in:
parent
b283e526bf
commit
be2d3f7769
@ -198,7 +198,7 @@ Channel &Channels::getByIndex(ChannelIndex chIndex)
|
|||||||
} else {
|
} else {
|
||||||
LOG_ERROR("Invalid channel index %d > %d, malformed packet received?\n", chIndex , channelFile.channels_count);
|
LOG_ERROR("Invalid channel index %d > %d, malformed packet received?\n", chIndex , channelFile.channels_count);
|
||||||
|
|
||||||
Channel *ch = (Channel *)malloc(sizeof(Channel));
|
static Channel *ch = (Channel *)malloc(sizeof(Channel));
|
||||||
memset(ch, 0, sizeof(Channel));
|
memset(ch, 0, sizeof(Channel));
|
||||||
// ch.index -1 means we don't know the channel locally and need to look it up by settings.name
|
// ch.index -1 means we don't know the channel locally and need to look it up by settings.name
|
||||||
// not sure this is handled right everywhere
|
// not sure this is handled right everywhere
|
||||||
|
Loading…
Reference in New Issue
Block a user