plugins/router_http: fix leak if connection to host fails

Fix Coverity CID #971069.
This commit is contained in:
Riccardo Magliocchetti
2013-01-26 18:29:36 +01:00
parent ac3d617037
commit ec1bfdeb2a
+1
View File
@@ -42,6 +42,7 @@ int uwsgi_routing_func_http(struct wsgi_request *wsgi_req, struct uwsgi_route *u
int http_fd = uwsgi_connect(addr, uwsgi.shared->options[UWSGI_OPTION_SOCKET_TIMEOUT], 0);
if (http_fd < 0) {
uwsgi_log("unable to connect to host %s\n", addr);
free(ub);
return UWSGI_ROUTE_NEXT;
}