From 3d40b827b8ad9289711d094599fc84c188f27745 Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Sun, 9 Feb 2020 16:05:12 +0100 Subject: [PATCH] Fix a memory leak reported by valgrind --- libnymea-mqtt/mqttserver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libnymea-mqtt/mqttserver.cpp b/libnymea-mqtt/mqttserver.cpp index 854d96b..2260f25 100644 --- a/libnymea-mqtt/mqttserver.cpp +++ b/libnymea-mqtt/mqttserver.cpp @@ -105,7 +105,7 @@ void MqttServer::setAuthorizer(MqttAuthorizer *authorizer) int MqttServer::listen(const QHostAddress &address, quint16 port, const QSslConfiguration &sslConfiguration) { - SslServer *server = new SslServer(sslConfiguration); + SslServer *server = new SslServer(sslConfiguration, this); connect(server, &SslServer::clientConnected, d_ptr, &MqttServerPrivate::onClientConnected); connect(server, &SslServer::clientDisconnected, d_ptr, &MqttServerPrivate::onClientDisconnected); connect(server, &SslServer::dataAvailable, d_ptr, &MqttServerPrivate::onDataAvailable);