mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-09-05 05:01:36 +00:00
core: check return of uwsgi_connect in uwsgi_opt_connect_and_read
Reported by Coverity as CID #970995.
This commit is contained in:
+3
-1
@@ -4035,7 +4035,7 @@ void uwsgi_opt_connect_and_read(char *opt, char *address, void *foobar) {
|
||||
char buf[8192];
|
||||
|
||||
int fd = uwsgi_connect(address, -1, 0);
|
||||
for (;;) {
|
||||
while (fd >= 0) {
|
||||
int ret = uwsgi_waitfd(fd, -1);
|
||||
if (ret <= 0) {
|
||||
exit(0);
|
||||
@@ -4046,6 +4046,8 @@ void uwsgi_opt_connect_and_read(char *opt, char *address, void *foobar) {
|
||||
}
|
||||
uwsgi_log("%.*s", (int) len, buf);
|
||||
}
|
||||
uwsgi_error("uwsgi_connect()");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
void uwsgi_opt_extract(char *opt, char *address, void *foobar) {
|
||||
|
||||
Reference in New Issue
Block a user