diff options
Diffstat (limited to 'contrib/ipfilter/l4check/l4check.c')
-rw-r--r-- | contrib/ipfilter/l4check/l4check.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/contrib/ipfilter/l4check/l4check.c b/contrib/ipfilter/l4check/l4check.c index 6945b1c..23ac79a 100644 --- a/contrib/ipfilter/l4check/l4check.c +++ b/contrib/ipfilter/l4check/l4check.c @@ -141,7 +141,8 @@ void closel4(l4, dead) l4cfg_t *l4; int dead; { - close(l4->l4_fd); + if (l4->l4_fd != -1) + close(l4->l4_fd); l4->l4_fd = -1; l4->l4_rw = -1; if (dead && l4->l4_alive) { @@ -307,7 +308,7 @@ int runconfig() if (opts & OPT_VERBOSE) fprintf(stderr, "failed\n"); perror("connect"); - close(fd); + closel4(l4, 1); fd = -1; } else { if (opts & OPT_VERBOSE) |