mirror of https://github.com/ARMmbed/mbed-os.git
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
parent
9111aa4c2d
commit
dd07c522c9
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue