FreeRTOS / FreeRTOS-Plus-TCP

FreeRTOS-Plus-TCP library repository. +TCP files only. Submoduled into https://github.com/FreeRTOS/FreeRTOS and various other repos.
MIT License
152 stars 163 forks source link

Avoid network buffer leak in FreeRTOS_ND.c #1074

Closed htibosch closed 10 months ago

htibosch commented 10 months ago

Description

On the FreeRTOS forum, zugo83 reported a possible leak of network buffers.

He analysed the allocations and decallocations, and i looks like the function vNDSendNeighbourSolicitation() omits to release a network buffer.

Normally the message will be passed to vReturnEthernetFrame(), which will release it. But if that function can not be called, the buffer must be released manually by calling vReleaseNetworkBufferAndDescriptor().

Test Steps

Checklist:

Related Issue

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.