Update the address of the Free Software Foundation in all copyright headers.
[tinc] / src / event.c
index 5df0527..2fb65ec 100644 (file)
@@ -1,6 +1,6 @@
 /*
     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"
@@ -124,7 +122,9 @@ event_t *get_expired_event(void)
                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;
                }
        }