Bug #1774

lighttpd memory leak on duplicated request header

Added by qhy about 6 years ago. Updated about 6 years ago.

Status:FixedStart date:
Priority:HighDue 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

lighttpd-1.4.19.memory.leak.patch Magnifier - patch to resolve memory leak (2.17 KB) qhy, 2008-09-20 12:17

History

#1 Updated by stbuehler about 6 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