[Nagiosplug-devel] Nagiosplugins 1.4.11 on HP UX

Thomas Guyot-Sionnest dermoth at aei.ca
Tue Feb 12 04:22:08 CET 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 11/02/08 06:34 PM, Ton Voon wrote:
> On 11 Feb 2008, at 22:46, Holger Weiss wrote:
> 
>> However, I now looked through our code and couldn't find any instance
>> where *my_thresholds isn't initialized to NULL.  So, I have no idea  
>> how
>> it could ever equal -1.  Do you happen to remember any details?  Any
>> idea how we could try to reproduce that?
> 
> 
> I can't recall. I tried looking in the svn log, but it was probably  
> before the move from cvs.
> 
> I think I initially used *my_thresholds != NULL, but some OSes had  
> *my_thresholds = -1, causing an error at the free.

Normally the thresholds variable should be initialized to NULL, so any
non-null should be free()able. Anyways my vote would be to leave the job
of freeing that variable prior to re-assignation to the calling program.
Considering that most programs calls that function only once it makes
sense...

On top of my head that could possibly break check_disk that uses
threshold functions extensively and supports multiple objects and their
respective thresholds.

Any objection that I drop these lines and move the free to the plugins
that re-assign thresholds?

Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHsRDg6dZ+Kt5BchYRAh6DAJ40kMEA0XL7JLTqdsZn2BbbR5JpOwCfRLDW
A0hi6+sUJjAOg0K0C5RlN4U=
=iIsH
-----END PGP SIGNATURE-----




More information about the Devel mailing list