Skip to content

Commit

Permalink
Merge pull request #200 from jbert/master
Browse files Browse the repository at this point in the history
Fix segfault in psgi plugin
  • Loading branch information
unbit committed Mar 28, 2013
2 parents 6a7a5cb + d0cca85 commit 2314b9c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugins/psgi/psgi_plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,10 @@ void uwsgi_perl_after_request(struct wsgi_request *wsgi_req) {

log_request(wsgi_req);

// We may be called after an early exit in XS_coroae_accept_request,
// before the environ is set up.
if (!wsgi_req->async_environ) return;

// dereference %env
SV *env = SvRV((SV *) wsgi_req->async_environ);

Expand Down

0 comments on commit 2314b9c

Please sign in to comment.