nitroshare/qhttpengine

potential memory leak

Opened this issue · 0 comments

My client code calls QHttpEngine::QObjectHandler::registerMethod(...):

Direct leak of 24 byte(s) in 1 object(s) allocated from:
#0 0x7f184c417ca1 in operator new(unsigned long) /build/gcc/src/gcc/libsanitizer/asan/asan_new_delete.cpp:99
#1 0x55a2db94726b in registerMethod_functor<HttpServer::HttpServer(...arguments...)::<lambda(QHttpEngine::Socket*)>, void (HttpServer::HttpServer(...arguments...)::<lambda(QHttpEngine::Socket*)>::)(QHttpEngine::Socket) const> /src/include/qhttpengine/qobjecthandler.h:184
#2 0x55a2db94726b in registerMethod<HttpServer::HttpServer(...arguments...)::<lambda(QHttpEngine::Socket*)> > /src/include/qhttpengine/qobjecthandler.h:157
#3 0x55a2db94726b in registerMethod<HttpServer::HttpServer(...arguments...)::<lambda(QHttpEngine::Socket*)> > /src/include/qhttpengine/qobjecthandler.h:142
#4 0x55a2db94726b in main.cpp:250

I deleted my QObjectHandler during shutdown.

I think this is the new QtPrivate::QFunctorSlotObject<Func1, 1, typename SlotType::Arguments, void>(slot) in qobjecthandler.h:184. Where is that new deleted?