diff options
Diffstat (limited to 'tests/pkd')
-rw-r--r-- | tests/pkd/pkd_daemon.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/pkd/pkd_daemon.c b/tests/pkd/pkd_daemon.c index 07736fa6..61582b5a 100644 --- a/tests/pkd/pkd_daemon.c +++ b/tests/pkd/pkd_daemon.c @@ -451,7 +451,9 @@ static void *pkd_main(void *args) { } } - close(pkd_state.server_fd); + if (pkd_state.server_fd != -1) { + close(pkd_state.server_fd); + } pkd_state.server_fd = -1; out: ctx.rc = rc; |