diff options
-rw-r--r-- | src/exchange/taler-exchange-httpd.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/exchange/taler-exchange-httpd.c b/src/exchange/taler-exchange-httpd.c index 0f8740879..0dd3f9685 100644 --- a/src/exchange/taler-exchange-httpd.c +++ b/src/exchange/taler-exchange-httpd.c @@ -1060,9 +1060,10 @@ main (int argc, fh_admin = -1; } flags |= FD_CLOEXEC; - if (0 != fcntl (fh_admin, - F_SETFD, - flags)) + if ( (-1 != fh_admin) && + (0 != fcntl (fh_admin, + F_SETFD, + flags)) ) GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "fcntl"); } |