summaryrefslogtreecommitdiff
path: root/modules/websocket
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2022-10-13 18:04:12 +0200
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2022-10-13 18:05:50 +0200
commit0fe01b6b4a3ddcc1acf3f1a01e1529328a6569d7 (patch)
treeaa6613639a86e717aee0c53d861d71d1072de13a /modules/websocket
parent2c13919e2876d8d1e1c92dac67f23ce6cc5ec089 (diff)
[WebSocket] Fix potential double free after multiplayer clear.
Diffstat (limited to 'modules/websocket')
-rw-r--r--modules/websocket/websocket_multiplayer_peer.cpp1
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) {