Skip to content

Commit 560ec41

Browse files
committed
Update comment - for #75
1 parent 9d9e2ea commit 560ec41

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/u-blox_GNSS.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -1719,6 +1719,7 @@ void DevUBLOXGNSS::process(uint8_t incoming, ubxPacket *incomingUBX, uint8_t req
17191719
}
17201720

17211721
packetAuto.payload = payloadAuto;
1722+
17221723
if (payloadAuto == nullptr) // Check if the alloc failed
17231724
{
17241725
#ifndef SFE_UBLOX_REDUCED_PROG_MEM
@@ -3276,8 +3277,8 @@ void DevUBLOXGNSS::processUBX(uint8_t incoming, ubxPacket *incomingUBX, uint8_t
32763277
}
32773278
}
32783279

3279-
// Now that the packet is complete and has been processed, we need to delete the memory
3280-
// allocated for packetAuto
3280+
// Now that the packet is complete and has been processed, 'free' the memory for packetAuto
3281+
// but leave payloadAuto allocated (See #75)
32813282
if (activePacketBuffer == SFE_UBLOX_PACKET_PACKETAUTO)
32823283
packetAuto.payload = nullptr;
32833284
}

0 commit comments

Comments
 (0)