/*
event.c -- event queue
- Copyright (C) 2002-2007 Guus Sliepen <guus@tinc-vpn.org>,
+ Copyright (C) 2002-2009 Guus Sliepen <guus@tinc-vpn.org>,
2002-2005 Ivo Timmermans
This program is free software; you can redistribute it and/or modify
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- $Id$
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "system.h"
event = event_tree->head->data;
if(event->time < now) {
- avl_unlink_node(event_tree, event_tree->head);
+ avl_node_t *node = event_tree->head;
+ avl_unlink_node(event_tree, node);
+ free(node);
return event;
}
}