8000 Fix a memory leak in WiFi · headcloudmonkey/esp32-snippets@e777afe · GitHub
[go: up one dir, main page]

Skip to content

Commit e777afe

Browse files
committed
Fix a memory leak in WiFi
1 parent c544fbf commit e777afe

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cpp_utils/WiFi.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ class WiFi {
139139
* @param[in] wifiEventHandler The class that will be used to process events.
140140
*/
141141
void setWifiEventHandler(WiFiEventHandler *wifiEventHandler) {
142+
delete this->wifiEventHandler;
142143
this->wifiEventHandler = wifiEventHandler;
143144
}
144145
private:

0 commit comments

Comments
 (0)
0