mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-15 07:54:33 +00:00
BUG/MEDIUM: fcgi-app: fix memory leak in fcgi_flt_http_headers
When the loop is continued early, the memory for param_rule is not freed. This can leak memory per request, which will eventually consume all available memory on the server. This patch should fix the issue #750. It must be backported as far as 2.1.
This commit is contained in:
parent
45c457a629
commit
b605a736b0
@ -448,8 +448,10 @@ static int fcgi_flt_http_headers(struct stream *s, struct filter *filter, struct
|
||||
|
||||
b_reset(value);
|
||||
value->data = build_logline(s, value->area, value->size, param_rule->value);
|
||||
if (!value->data)
|
||||
if (!value->data) {
|
||||
pool_free(pool_head_fcgi_param_rule, param_rule);
|
||||
continue;
|
||||
}
|
||||
if (!http_add_header(htx, param_rule->name, ist2(value->area, value->data)))
|
||||
goto rewrite_err;
|
||||
pool_free(pool_head_fcgi_param_rule, param_rule);
|
||||
|
Loading…
Reference in New Issue
Block a user