Page 1 of 1

Re: [Nagios-devel] Nagios 3.0b7 utils.c bug

Posted: Sat Dec 08, 2007 2:38 pm
by Guest
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: [email protected]
Web: www.nagios.org





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]