Project

General

Profile

Bug #1774

lighttpd memory leak on duplicated request header

Added by qhy almost 8 years ago. Updated almost 8 years ago.

Status:
Fixed
Priority:
High
Assignee:
-
Category:
core
Target version:
Start date:
Due date:
% Done:

0%

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 View - patch to resolve memory leak (2.17 KB) qhy, 2008-09-20 12:17

Associated revisions

Revision 3decb264 (diff)
Added by stbuehler almost 8 years ago

Fix memleak in request header parsing (#1774, thx qhy)

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2305 152afb58-edef-0310-8abb-c4023f1b3aa9

History

#1 Updated by stbuehler almost 8 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