Nagios 3.0b7 utils.c bug

David Halik dhalik at jla.rutgers.edu
Fri Dec 7 23:14:59 CET 2007


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 */

-- 
================================
David Halik
Student Programmer
OSS/NBCS - OIT Rutgers
dhalik at jla.rutgers.edu
================================ 


-------------------------------------------------------------------------
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