Fix for segfault when a port failed to open due to any reason

Fixes issue 64
This commit is contained in:
Srivats P. 2012-03-07 19:25:09 +05:30
parent 0d253cdb09
commit 87ee8244fc

View File

@ -252,7 +252,8 @@ _open_error:
PcapPort::PortMonitor::~PortMonitor() PcapPort::PortMonitor::~PortMonitor()
{ {
pcap_close(handle_); if (handle_)
pcap_close(handle_);
} }
void PcapPort::PortMonitor::run() void PcapPort::PortMonitor::run()