<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic fsl_enet.c memory deallocation bug in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/fsl-enet-c-memory-deallocation-bug/m-p/1923281#M66632</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I couldn't see anywhere else to post a bug fix, so I will post here.&lt;/P&gt;&lt;P&gt;I have isolated a memory deallocation bug in the SDK ethernet driver code. I am using &lt;LI-PRODUCT title="K66_180" id="K66_180"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;with SDK version 2.11.0. The bug is located in the ENET_GetRxFrame() function. &lt;SPAN&gt;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:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;--------------------------- 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-&amp;gt;rxBuffFree(base, &amp;amp;rxFrame-&amp;gt;rxBuffArray[index].buffer, handle-&amp;gt;userData, ringId);
+                handle-&amp;gt;rxBuffFree(base, rxFrame-&amp;gt;rxBuffArray[index].buffer, handle-&amp;gt;userData, ringId);
             }
 
             /* Update left buffers as ready for next coming frame */&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 01 Aug 2024 17:47:03 GMT</pubDate>
    <dc:creator>kevin2024</dc:creator>
    <dc:date>2024-08-01T17:47:03Z</dc:date>
    <item>
      <title>fsl_enet.c memory deallocation bug</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/fsl-enet-c-memory-deallocation-bug/m-p/1923281#M66632</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I couldn't see anywhere else to post a bug fix, so I will post here.&lt;/P&gt;&lt;P&gt;I have isolated a memory deallocation bug in the SDK ethernet driver code. I am using &lt;LI-PRODUCT title="K66_180" id="K66_180"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;with SDK version 2.11.0. The bug is located in the ENET_GetRxFrame() function. &lt;SPAN&gt;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:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;--------------------------- 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-&amp;gt;rxBuffFree(base, &amp;amp;rxFrame-&amp;gt;rxBuffArray[index].buffer, handle-&amp;gt;userData, ringId);
+                handle-&amp;gt;rxBuffFree(base, rxFrame-&amp;gt;rxBuffArray[index].buffer, handle-&amp;gt;userData, ringId);
             }
 
             /* Update left buffers as ready for next coming frame */&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2024 17:47:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/fsl-enet-c-memory-deallocation-bug/m-p/1923281#M66632</guid>
      <dc:creator>kevin2024</dc:creator>
      <dc:date>2024-08-01T17:47:03Z</dc:date>
    </item>
    <item>
      <title>Re: fsl_enet.c memory deallocation bug</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/fsl-enet-c-memory-deallocation-bug/m-p/1925562#M66634</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Thank you so much for your interest in our products and for using our community.&lt;/P&gt;
&lt;P&gt;Very good observation, this issue had not been noticed. I will report it to the corresponding department so that it can be corrected in the next review. I appreciate your feedback as it helps us improve our products.&lt;/P&gt;
&lt;P&gt;Have a nice day!&lt;/P&gt;</description>
      <pubDate>Mon, 05 Aug 2024 17:24:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/fsl-enet-c-memory-deallocation-bug/m-p/1925562#M66634</guid>
      <dc:creator>_Leo_</dc:creator>
      <dc:date>2024-08-05T17:24:37Z</dc:date>
    </item>
  </channel>
</rss>

