Wireshark mailing list archives
File handle leak in add_hosts_file()
From: Evan Huus <eapache () gmail com>
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 ___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- File handle leak in add_hosts_file() Evan Huus (Jan 01)