jib/libvmod-statsd — pull request #4 by Savar (2013-04-19 11:29:47+00:00)
Title: fix some memory issues

* getaddrinfo is alread allocating the addrinfo struct so we get a
(quiet small) memory hole
* now checking if malloc failed for whatever reason
* free allocated memory in case of an error (otherwise we 'could'
take all available memory when having a connect failure on each
statsd call)
* TODO if I startup a varnish and put all traffic at once on it the
freeaddrinfo is failing (in libjemalloc/jemalloc_linux.c) and I
don't know why. Probably this is a bug in the libjemalloc but I'm
not sure about that, maybe it is a problem with multithreading (many
of them tries to connect but a fprintf() debugging doesn't show
something like that)..