zedshaw/mongrel2 — pull request #128 by troels (2012-05-02 12:08:43+00:00)
Title: Fix for issue #121 and some related ones.

Hi, I've been looking through the mongrel2 source and ran into this bug, and a couple of related.

The problem is that stuff is freed, but variables are not reset, so if a later error occurs, the lines, under
error:
if (res) free(res); etc.

will result in free being called on already freed memory. I've fixed the problems i've seen in this particular file, but there maybe others.