Hello,
I couldn't see anywhere else to post a bug fix, so I will post here.
I have isolated a memory deallocation bug in the SDK ethernet driver code. I am using K66_180 with SDK version 2.11.0. The bug is located in the ENET_GetRxFrame() function. Briefly, the incorrect code supplies the address of the pointer to the memory to be deallocated rather than the memory to be deallocated. The diff to fix the bug is as follows:
--------------------------- drivers/fsl_enet.c ---------------------------
index cd30cab..feedd81 100644
@@ -2537,7 +2537,7 @@ status_t ENET_GetRxFrame(ENET_Type *base, enet_handle_t *handle, enet_rx_frame_s
/* Free the incomplete frame buffers. */
while (index-- != 0U)
{
- handle->rxBuffFree(base, &rxFrame->rxBuffArray[index].buffer, handle->userData, ringId);
+ handle->rxBuffFree(base, rxFrame->rxBuffArray[index].buffer, handle->userData, ringId);
}
/* Update left buffers as ready for next coming frame */