1
0
Fork 0

Frees rx_buf if were dropping an unexpected seq'd packet

This commit is contained in:
Shawn Nock 2019-08-02 15:29:06 -04:00
parent 2366c8bcef
commit 29c8a3d77b
1 changed files with 1 additions and 0 deletions

View File

@ -591,6 +591,7 @@ static void unproc_thread(void) {
u8_t expected_seq = next_seq(h5.last_seen_seq_from_host); u8_t expected_seq = next_seq(h5.last_seen_seq_from_host);
if (hdr.is_reliable && hdr.seq != expected_seq) { if (hdr.is_reliable && hdr.seq != expected_seq) {
LOG_ERR("Seq expected %u got %u. Drop packet", expected_seq, hdr.seq); LOG_ERR("Seq expected %u got %u. Drop packet", expected_seq, hdr.seq);
net_buf_unref(rx_buf);
goto next; goto next;
} }
h5.last_seen_seq_from_host = hdr.seq; h5.last_seen_seq_from_host = hdr.seq;