Wireshark mailing list archives
CaptureEvent is leaking for every event
From: Peter Wu <peter () lekensteyn nl>
Date: Sun, 25 Mar 2018 23:22:55 +0200
Hi Roland and others, Since v2.5.0rc0-2085-gd5d815189d, there is a memory leak for every capture event. One of the many events (as reported by LeakSanitizer): Indirect leak of 112 byte(s) in 1 object(s) allocated from: #0 0x55641541d1a1 in operator new(unsigned long) (run/wireshark+0x16251a1) #1 0x7feb853f9162 in QObject::QObject(QObject*) (/usr/lib/libQt5Core.so.5+0x2d5162) #2 0x556415471215 in CaptureEvent::CaptureEvent(CaptureEvent::Context, CaptureEvent::EventType) ui/qt/capture_file.cpp:31:15 #3 0x5564154740d2 in CaptureFile::captureFileEvent(int, void*) ui/qt/capture_file.cpp:215:31 #4 0x5564154376d2 in cf_callback_invoke file.c:145:5 #5 0x556415438a72 in cf_read file.c #6 0x5564155abe20 in MainWindow::openCaptureFile(QString, QString, unsigned int, int) ui/qt/main_window_slots.cpp:249:17 #7 0x556415423ea0 in main wireshark-qt.cpp:851:21 #8 0x7feb83a44f49 in __libc_start_main (/usr/lib/libc.so.6+0x20f49) #9 0x556415320629 in _start (run/wireshark+0x1528629) This looks fishy, a new instance is created every time, but who is responsible for cleaning it up? case(cf_cb_file_read_finished): emit captureEvent(new CaptureEvent(CaptureEvent::File, CaptureEvent::Finished)); break; Could you have a look? -- Kind regards, Peter Wu https://lekensteyn.nl ___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: https://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- CaptureEvent is leaking for every event Peter Wu (Mar 25)