[collectd] [PATCH 2/2] Fixes memory leak when writing to unixsocket fails

Florian Forster octo at verplant.org
Wed Feb 10 11:56:14 CET 2010


Hi Peter,

On Mon, Feb 08, 2010 at 07:53:52PM +0100, Peter Warasin wrote:
> print_to_socket() simply returns from current function always when it
> was not able to write to the socket.
> 
> If this happens variables will not be freed.

thank you very much for tracking down that memory leak.

I'm not quite sure how I feel about the "garbage collector" yet. I'd fix
the memory leak by simply calling "sfree" on all variables for now and
keep the "garbage collector" as a possible new feature for the next
version. Does that sound okay to you?

Regards,
—octo
-- 
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
http://verplant.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20100210/6ba9e67b/attachment.pgp 


More information about the collectd mailing list