diff options
author | Peter Wu <peter@lekensteyn.nl> | 2018-03-09 15:17:02 +0100 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2018-03-09 16:10:32 +0000 |
commit | a395a8b9939bd48858efbd3da5897a59d4697eba (patch) | |
tree | 350aa431f224e733f6da811ebdfb9ad25534d9ce /mmdbresolve.c | |
parent | 02085c80ab10507f6a75d75fe1e43facade98a0e (diff) |
GeoIP: avoid closing random file descriptors
Previously there were three different pipe validity checks:
PID != WS_INVALID_PID, PID != 0 and stdin != 0. This resulted in
using/closing file descriptors which might be owned by something else.
When no GeoIP databases are defined, mmdb_resolve_stop would be called
to close the pipe and set PID to WS_INVALID_PID. stdin is however not
cleared and future invocations would try to close the previous fd.
Change-Id: I1d15da29208efb41098ee6a4edeeabf61f84c2b3
Fixes: v2.5.1rc0-466-ga1da75c554 ("Transition from GeoIP Legacy to MaxMindDB.")
Reviewed-on: https://code.wireshark.org/review/26391
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'mmdbresolve.c')
0 files changed, 0 insertions, 0 deletions