diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-13 18:40:44 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-13 18:40:44 +0200 |
commit | 027df4124473f4ff09be2f6a08a0770befc6a077 (patch) | |
tree | aa6613639a86e717aee0c53d861d71d1072de13a | |
parent | 2c13919e2876d8d1e1c92dac67f23ce6cc5ec089 (diff) | |
parent | 0fe01b6b4a3ddcc1acf3f1a01e1529328a6569d7 (diff) |
Merge pull request #67354 from Faless/ws/fix_double_free
[WebSocket] Fix potential double free after multiplayer clear.
-rw-r--r-- | modules/websocket/websocket_multiplayer_peer.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/websocket/websocket_multiplayer_peer.cpp b/modules/websocket/websocket_multiplayer_peer.cpp index 00b96ec587..c314ebd049 100644 --- a/modules/websocket/websocket_multiplayer_peer.cpp +++ b/modules/websocket/websocket_multiplayer_peer.cpp @@ -61,6 +61,7 @@ void WebSocketMultiplayerPeer::_clear() { tls_key.unref(); if (current_packet.data != nullptr) { memfree(current_packet.data); + current_packet.data = nullptr; } for (Packet &E : incoming_packets) { |