Bug #1774
lighttpd memory leak on duplicated request header
| Status: | Fixed | Start date: | ||
|---|---|---|---|---|
| Priority: | High | Due date: | ||
| Assignee: | - | % Done: | 0% | |
| Category: | core | |||
| Target version: | 1.4.20 | |||
| Missing in 1.5.x: |
Description
http_request_parse function of request.c just return 0 without free previous allocated data_string when duplicated request header found.
it causes memory leak
History
#1 Updated by stbuehler over 4 years ago
- Status changed from New to Fixed
- Resolution set to fixed
Good catch! fixed in r2305
Used
array_insert_unique(con->request.headers, (data_unset *)ds);
instead of
ds->free((data_unset*)ds);
to reuse memory and save us the malloc/free calls.
Also available in: Atom
