[PATCH] Macros: fix of invalid free for TOTALHOSTSERVICES* macros

Andreas Ericsson ae at op5.se
Tue Mar 19 21:55:03 CET 2013


On 03/19/2013 12:06 AM, Max Sikstrom wrote:
> From: Max Sikström <msikstrom at op5.com>
>
> The $TOTALHOSTSERVICES*$ macros were computed all at the same time, with the
> result stashed in mac->x using the mkstr method (from worker.c? why worker.c?)
>

It's in nsutils.c now, if that's any comfort ;)


> The mkstr uses an static internal buffer of usally 256 strings, of each 32
> bytes, for generation of strings, used in macros. When computing
> TOTALHOSTSERVICES*, the valuse is, as said, stashed in mac->x[], which is freed
>   at cleanup, with some exceptions, and this isn't one of them.
>
> Those needs to be exceptions, so static function variables isn't freed
>

Neato. Thanks. I'll apply asap (which is tomorrow, since I'm too lazy to 
stash, apply and push right now).

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

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Nagios-devel mailing list
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel


More information about the Developers mailing list