espressif / esp-hosted

Hosted Solution (Linux/MCU) with ESP32 (Wi-Fi + BT + BLE)
Other
675 stars 158 forks source link

esp_hosted_ng: fix skb leak in process_rx_packet #337

Closed jcmvbkbc closed 7 months ago

jcmvbkbc commented 7 months ago

process_rx_packet() doesn't free the original skb when PACKET_TYPE_EAPOL packet is processed. Add dev_kfree_skb_any(skb) calls to both success and error paths of the PACKET_TYPE_EAPOL message processing code. This fixes memory leaks reported by the kernel built with KMEMLEAK.

mantriyogesh commented 7 months ago

Thank you @jcmvbkbc for your time and effort to contribute this change. We will shortly merge this PR into the master.

mantriyogesh commented 7 months ago

@kapilkedawat ++

kapilkedawat commented 7 months ago

LGTM, will merge internally and sync to github shortly.

jcmvbkbc commented 7 months ago

I realized that this pull request also has changed idf submodule tag. This was definitely not my intent, thanks for picking up only the correct changes.

mantriyogesh commented 7 months ago

Can we close this PR @jcmvbkbc ? as changes are in: https://github.com/espressif/esp-hosted/commit/4527e1040cdc0c5a0e4d957fd30ec0a4e7cc046d

jcmvbkbc commented 7 months ago

Sure. Thanks again.