Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: [Wireshark-dev] File handle leak in add_hosts_file()

From: Evan Huus <eapache@xxxxxxxxx>
Date: Tue, 1 Jan 2013 16:01:58 -0500
Just noticed (thanks to cppcheck) that in
add_hosts_file@epan/addr_resolv.c:2080 we open a file that we then
never close or even use.

It's definitely a leak, but I'm not sure what the intention was. Can
the entire ws_fopen call just be removed, or is it being used as a
check that the file exists and is readable? In that case there's
probably a better way to do that, or maybe not in cross-platform
manner?

Cheers,
Evan