GetRecordingState() and GetChannelIndex() on HDZero and Skyzone VRX Backpacks allocate a new msppacket every call, but never free it. This fixes it by using a value off the stack instead of the heap.
The msppacket structure is pretty big since it contains a 64 byte buffer in addition to its other members so this will add up, but it is unlikely anyone would run out of memory due to this even though every SendIndexCmd() calls Get at least twice.
GetRecordingState()
andGetChannelIndex()
on HDZero and Skyzone VRX Backpacks allocate a new msppacket every call, but never free it. This fixes it by using a value off the stack instead of the heap.The msppacket structure is pretty big since it contains a 64 byte buffer in addition to its other members so this will add up, but it is unlikely anyone would run out of memory due to this even though every
SendIndexCmd()
calls Get at least twice.