about summary refs log tree commit homepage
tag namev0.96.1 (80f0be9dc8b063f4888f3cef979015246529c1b1)
tag date2010-02-13 00:35:51 -0800
tagged byEric Wong <normalperson@yhbt.net>
tagged objectcommit ec8ca22c45...
downloadunicorn-0.96.1.tar.gz
unicorn 0.96.1 - fix leak in Rainbows!/Zbatery
This maintenance release is intended for users of Rainbows! and
Zbatery servers (and anybody else using Unicorn::HttpParser).

This memory leak DID NOT affect Unicorn itself: Unicorn always
allocates the HttpParser once and always reuses it in every
sequential request.

This leak affects applications that repeatedly allocate a new
HTTP parser.  Thus this bug affects _all_ deployments of
Rainbows! and Zbatery.  These servers allocate a new parser for
every client connection to serve clients concurrently.

I misread the Data_Make_Struct()/Data_Wrap_Struct()
documentation and ended up passing NULL as the "free" argument
instead of -1, causing the memory to never be freed.

From README.EXT in the MRI source which I misread:
> The free argument is the function to free the pointer
> allocation.  If this is -1, the pointer will be just freed.
> The functions mark and free will be called from garbage
> collector.