You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/02/16 08:25:52 UTC

[GitHub] [incubator-nuttx] yamt commented on a change in pull request #2858: arch: esp32: Fix a memory leak when discarding a large packet.

yamt commented on a change in pull request #2858:
URL: https://github.com/apache/incubator-nuttx/pull/2858#discussion_r576629818



##########
File path: arch/xtensa/src/esp32/esp32_wlan.c
##########
@@ -493,6 +493,12 @@ static int wlan_rx_done(void *buffer, uint16_t len, void *eb)
     {
       nwarn("ERROR: Wlan receive %d larger than %d\n",
              len, WLAN_BUF_SIZE);
+
+      if (eb)
+        {
+          esp_wifi_free_eb(eb);
+        }
+

Review comment:
       i guess we should do the same for the above `if (!priv->ifup)` block as well. how do you think?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org