diff options
| author | Graham Dumpleton <Graham.Dumpleton@gmail.com> | 2019-06-07 10:45:16 +1000 |
|---|---|---|
| committer | Graham Dumpleton <Graham.Dumpleton@gmail.com> | 2019-06-07 10:45:16 +1000 |
| commit | b424cc2b988b238b032dc756420b4b1cb5f58417 (patch) | |
| tree | e89887e18e766dcb19c239ebf8c273fa265614fd /src | |
| parent | 5bcdf62bcae8bd2d98e49da0f6dd1ace4939321e (diff) | |
| download | mod_wsgi-b424cc2b988b238b032dc756420b4b1cb5f58417.tar.gz | |
Close socket on failures.
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/mod_wsgi.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/server/mod_wsgi.c b/src/server/mod_wsgi.c index b14298e..2815873 100644 --- a/src/server/mod_wsgi.c +++ b/src/server/mod_wsgi.c @@ -8512,6 +8512,9 @@ static int wsgi_setup_socket(WSGIProcessGroup *process) ap_log_error(APLOG_MARK, APLOG_ALERT, errno, wsgi_server, "mod_wsgi (pid=%d): Couldn't bind unix domain " "socket '%s'.", getpid(), process->socket_path); + + close(sockfd); + return -1; } @@ -8523,6 +8526,9 @@ static int wsgi_setup_socket(WSGIProcessGroup *process) ap_log_error(APLOG_MARK, APLOG_ALERT, errno, wsgi_server, "mod_wsgi (pid=%d): Couldn't listen on unix domain " "socket.", getpid()); + + close(sockfd); + return -1; } @@ -8557,6 +8563,9 @@ static int wsgi_setup_socket(WSGIProcessGroup *process) "mod_wsgi (pid=%d): Couldn't change owner of unix " "domain socket '%s' to uid=%ld.", getpid(), process->socket_path, (long)socket_uid); + + close(sockfd); + return -1; } } |
