diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2022-10-13 18:04:12 +0200 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2022-10-13 18:05:50 +0200 |
commit | 0fe01b6b4a3ddcc1acf3f1a01e1529328a6569d7 (patch) | |
tree | aa6613639a86e717aee0c53d861d71d1072de13a | |
parent | 2c13919e2876d8d1e1c92dac67f23ce6cc5ec089 (diff) |
[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) { |