Skip to content

Commit

Permalink
controller: lib: src: MSVC: net if, init pcap_interface pointer to nu…
Browse files Browse the repository at this point in the history
…llptr
  • Loading branch information
Andrew Elder committed Mar 17, 2016
1 parent c74348b commit 2b1edf3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion controller/lib/src/msvc/net_interface_imp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,14 @@ namespace avdecc_lib
log_imp_ref->post_log_msg(LOGGING_LEVEL_ERROR, "No interfaces found! Make sure WinPcap is installed.");
exit(EXIT_FAILURE);
}
pcap_interface = nullptr;
}

net_interface_imp::~net_interface_imp()
{
pcap_freealldevs(all_devs); // Free the device list
pcap_close(pcap_interface);
if (pcap_interface != nullptr)
pcap_close(pcap_interface);
}

void STDCALL net_interface_imp::destroy()
Expand Down

0 comments on commit 2b1edf3

Please sign in to comment.