mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-25 17:42:48 +00:00
fix leak
This commit is contained in:
parent
b283e526bf
commit
be2d3f7769
@ -198,7 +198,7 @@ Channel &Channels::getByIndex(ChannelIndex chIndex)
|
||||
} else {
|
||||
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));
|
||||
// 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
|
||||
|
Loading…
Reference in New Issue
Block a user