Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.12.9, 5.15.0
-
None
-
788d4856330e6f5d251f9b153de3d22b8cf538f1 (qt/qtwebsockets/dev) eb2ddd0cb6b6f6ad391b5b43dbc1e88e41238417 (qt/qtwebsockets/5.15)
Description
We used valgrind to check our unit tests and found this "definite" memory leak of valgrind.
15,270 (16 direct, 15,254 indirect) bytes in 1 blocks are definitely lost in loss record 256 of 257 at 0x4839DEF: operator new(unsigned long) (vg_replace_malloc.c:342) by 0x48C916B: QSslServer::incomingConnection(long long) (qsslserver.cpp:110) by 0x4A4B387: QTcpServerPrivate::readNotification() (qtcpserver.cpp:221) by 0x4A42C41: QAbstractSocketEngine::readNotification() (qabstractsocketengine.cpp:160) by 0x4A5BDC4: QReadNotifier::event(QEvent*) (qnativesocketengine.cpp:1274) by 0x5D4F6E3: QCoreApplicationPrivate::notify_helper(QObject*, QEvent*) (qcoreapplication.cpp:1224) by 0x5D4F7AC: doNotify(QObject*, QEvent*) (qcoreapplication.cpp:1153) by 0x5D4F7D1: QCoreApplication::notify(QObject*, QEvent*) (qcoreapplication.cpp:1139) by 0x5D4F899: QCoreApplication::notifyInternal2(QObject*, QEvent*) (qcoreapplication.cpp:1063) by 0x5D4FAAD: QCoreApplication::sendEvent(QObject*, QEvent*) (qcoreapplication.cpp:1458) by 0x5DB9715: socketNotifierSourceDispatch(_GSource*, int (*)(void*), void*) (qeventdispatcher_glib.cpp:107) by 0x885C43B: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.6400.3)
Looks like "QSslSocket *pSslSocket = new QSslSocket()" is a leak sometimes.