Nagios 3.0b7 utils.c bug

Ethan Galstad nagios at nagios.org
Sat Dec 8 23:37:54 CET 2007


David Halik wrote:
> While building b7 on Solaris 9 I ran into an undefined symbol and it 
> turned out to be a typo. Looks like the code originally was 
> "env_macro_string" and changed to "env_string" at some point.
> 
> 
> diff -ruN nagios-3.0b7/base/utils.c nagios-3.0b7.new/base/utils.c
> --- nagios-3.0b7/base/utils.c   2007-11-12 20:27:20.000000000 -0500
> +++ nagios-3.0b7.new/base/utils.c       2007-12-07 17:03:23.828109000 -0500
> @@ -747,7 +747,7 @@
>                 /* this will leak memory, but in a "controlled" way, 
> since lost memory should be freed when the child process exits */
>                 asprintf(&env_string,"%s=%s",name,(value==NULL)?"":value);
>                 if(env_string)
> -                       putenv(env_macro_string);
> +                       putenv(env_string);
>  #endif
>                 }
>         /* clear the variable */
> 

Good catch! A patch will be in CVS shortly.


Ethan Galstad
Nagios Developer
___
Email: nagios at nagios.org
Web:   www.nagios.org

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php




More information about the Developers mailing list