[Nagios-checkins] SF.net SVN: nagios:[2117] nagioscore/trunk/common/objects.c

ageric at users.sourceforge.net ageric at users.sourceforge.net
Mon Aug 27 15:03:40 UTC 2012


Revision: 2117
          http://nagios.svn.sourceforge.net/nagios/?rev=2117&view=rev
Author:   ageric
Date:     2012-08-27 15:03:39 +0000 (Mon, 27 Aug 2012)
Log Message:
-----------
Plug a leak in common/objects.c

It seems I forgot to remove the separate object allocation for
serviceescalations when I did the "one allocation" patch. This
remedies that and makes "nagios -v -s" once again leak-free.

Signed-off-by: Andreas Ericsson <ae at op5.se>

Modified Paths:
--------------
    nagioscore/trunk/common/objects.c

Modified: nagioscore/trunk/common/objects.c
===================================================================
--- nagioscore/trunk/common/objects.c	2012-08-26 20:12:07 UTC (rev 2116)
+++ nagioscore/trunk/common/objects.c	2012-08-27 15:03:39 UTC (rev 2117)
@@ -1649,10 +1649,6 @@
 		return NULL ;
 		}
 
-	/* allocate memory for a new service escalation entry */
-	if((new_serviceescalation = calloc(1, sizeof(serviceescalation))) == NULL)
-		return NULL;
-
 	new_serviceescalation = &serviceescalation_list[num_objects.serviceescalations];
 
 	if(add_object_to_objectlist(&svc->escalation_list, new_serviceescalation) != OK) {

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.





More information about the Nagios-commits mailing list