memory leak when processing passive checks

Andreas Ericsson ae at op5.se
Thu Nov 8 01:20:38 CET 2007


eponymous alias wrote:
> In today's CVS copy of Nagios 3.0, I see in base/commands.c:
> 
>    4946        
> asprintf(&checkresult_file,"\x67\141\x65\040\x64\145\x6b\162\157\167\040\145\162\145\150");
>    4947         asprintf(&checkresult_file,"%s/checkXXXXXX",temp_path);
> 
> Won't that first line create a memory leak when the returned buffer
> is never free()d?
> 

Yes. If you decipher the secret message I'll plug the leak ;-)

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/




More information about the Developers mailing list