plugins/http: check return value of uwsgi_cr_set_hooks

Reported by Coverity as CID #970970
This commit is contained in:
Riccardo Magliocchetti
2013-12-28 15:54:23 +01:00
parent 4667eedc2b
commit 8b90efc567
+2 -1
View File
@@ -874,7 +874,8 @@ int http_alloc_session(struct uwsgi_corerouter *ucr, struct uwsgi_gateway_socket
break;
#endif
default:
uwsgi_cr_set_hooks(cs->main_peer, cs->main_peer->last_hook_read, NULL);
if (uwsgi_cr_set_hooks(cs->main_peer, cs->main_peer->last_hook_read, NULL))
return -1;
cs->close = hr_session_close;
break;
}