From 4f6195b8ba23ba2ed4787e364598da567b0fd6da Mon Sep 17 00:00:00 2001 From: Srivats P Date: Thu, 14 Jan 2016 20:09:42 +0530 Subject: [PATCH] Bugfix: On Linux, if a port is unusable for any reason (e.g. if pcap_open failed), it is deleted - at this time, it should also be removed from the allPorts_ list otherwise subsequent traversal of the list accesses the freed LinuxPort object leading to crash. Fixes #174 --- server/linuxport.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/linuxport.cpp b/server/linuxport.cpp index 55468ef..ba6369e 100644 --- a/server/linuxport.cpp +++ b/server/linuxport.cpp @@ -81,6 +81,8 @@ LinuxPort::~LinuxPort() { qDebug("In %s", __FUNCTION__); + allPorts_.removeAll(this); + if (monitor_->isRunning()) { monitor_->stop();