1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-21 10:26:06 +03:00

consequence of ::flush() update: fix potential double free (#3990)

This commit is contained in:
david gauchard 2017-12-18 12:56:18 +01:00 committed by Develo
parent f8b577b6c3
commit 022ea5a872

View File

@ -288,7 +288,8 @@ public:
data_size -= will_copy;
}
}
pbuf_free(_tx_buf_head);
if (_tx_buf_head)
pbuf_free(_tx_buf_head);
_tx_buf_head = 0;
_tx_buf_cur = 0;
_tx_buf_offset = 0;