Fix double free in NanostackInterface

When freeing all memory in the rx buffer chain set the head pointer to
NULL. This prevents the head rx buffer from getting freed twice.
pull/2578/head
Russ Butler 2016-08-29 17:14:16 -05:00
parent 9111aa4c2d
commit dd07c522c9
1 changed files with 1 additions and 0 deletions

View File

@ -368,6 +368,7 @@ void NanostackSocket::data_free_all(void)
// No mode requirement
NanostackBuffer *buffer = rxBufChain;
rxBufChain = NULL;
while (buffer != NULL) {
NanostackBuffer *next_buffer = buffer->next;
FREE(buffer);