From: <mgu...@us...> - 2012-11-12 20:19:43
|
Revision: 2468 http://nagios.svn.sourceforge.net/nagios/?rev=2468&view=rev Author: mguthrie88 Date: 2012-11-12 20:19:36 +0000 (Mon, 12 Nov 2012) Log Message: ----------- Applied changes from commit #2461. "Fixed issue where deleting a downtime could cause Nagios to crash." Modified Paths: -------------- nagioscore/branches/nagios-3-4-x/Changelog nagioscore/branches/nagios-3-4-x/common/downtime.c Modified: nagioscore/branches/nagios-3-4-x/Changelog =================================================================== --- nagioscore/branches/nagios-3-4-x/Changelog 2012-11-12 20:14:16 UTC (rev 2467) +++ nagioscore/branches/nagios-3-4-x/Changelog 2012-11-12 20:19:36 UTC (rev 2468) @@ -4,6 +4,7 @@ 3.4.2 - ??? ------------------ FIXES +* Fixed issue where deleting a downtime could cause Nagios to crash (Eric Stanley) * Corrected logic so that end times for flexible downtimes are calculated from the downtime start rather than the current time in the case where Nagios is restarted (Eric Stanley) * Fixed issue introduced by fix for bug #124 where flexible downtimes are not taken into account on Nagios restart. (Scott Wilkerson, Eric Stanley) * Fixed bug #247: If a service reports no performance data, the perfdata log file has no line indicating the test. (omn...@fr...) Modified: nagioscore/branches/nagios-3-4-x/common/downtime.c =================================================================== --- nagioscore/branches/nagios-3-4-x/common/downtime.c 2012-11-12 20:14:16 UTC (rev 2467) +++ nagioscore/branches/nagios-3-4-x/common/downtime.c 2012-11-12 20:19:36 UTC (rev 2468) @@ -405,6 +405,13 @@ return ERROR; } + /* NULL out this event's start time since the calling function, + handle_timed_event(), will free the event, this will prevent + unschedule_downtime from freeing something that has already been + freed. The start event is not needed within + handle_scheduled_downtime(). */ + temp_downtime->start_event = NULL; + /* handle the downtime */ return handle_scheduled_downtime(temp_downtime); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |