Commit a8ea3e73 authored by Axel Auweter's avatar Axel Auweter
Browse files

Fixes a memory leak / message decoding error when a MQTT client disconnects.

parent b946ab0c
......@@ -375,6 +375,11 @@ void SimpleMQTTServerMessageThread::releaseConnection(int connectionId)
fds[connectionId].events = 0;
fds[connectionId].revents = 0;
if(msg[connectionId]) {
delete msg[connectionId];
msg[connectionId] = NULL;
}
numConnections--;
fdsMtx.unlock();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment