Project

General

Profile

Actions

Bug #1774

closed

lighttpd memory leak on duplicated request header

Added by qhy over 16 years ago. Updated over 16 years ago.

Status:
Fixed
Priority:
High
Category:
core
Target version:
ASK QUESTIONS IN Forums:

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


Files

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

Updated by stbuehler over 16 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.

Actions

Also available in: Atom