diff options
author | Omar Polo <op@omarpolo.com> | 2022-11-27 10:34:30 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2022-11-27 10:34:30 +0000 |
commit | 17493a486c9e6325c3aae74920ddb10958ae2771 (patch) | |
tree | 721f033296ad5d80f3801d07d7752fca5f0a37b8 /fcgi.c | |
parent | eb4f96c10afcf8806cbbff3087aa0850e3fc9905 (diff) |
return after FCGI_END_REQUEST
this fixes a possible crash if `client_write' closes the connection,
because client_close can end up freeing the fastcgi bufferevent while
we're looping.
We don't support fastcgi multiplexing, so once we get an END_REQUEST
there's nothing more to do.
Prodded into looking here after a bug report from Allen Sobot, thanks!
Diffstat (limited to 'fcgi.c')
-rw-r--r-- | fcgi.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -290,7 +290,7 @@ fcgi_read(struct bufferevent *bev, void *d) /* TODO: do something with the status? */ c->type = REQUEST_DONE; client_write(c->bev, c); - break; + return; case FCGI_STDERR: /* discard stderr (for now) */ |