fix segv cause by latest changes
authorSven-Ola Tuecke <sven-ola@gmx.de>
Sun, 9 May 2010 13:12:17 +0000 (15:12 +0200)
committerSven-Ola Tuecke <sven-ola@gmx.de>
Sun, 9 May 2010 13:12:17 +0000 (15:12 +0200)
src/process_routes.c

index 47df783..757cd3b 100644 (file)
@@ -284,7 +284,7 @@ olsr_del_kernel_routes(struct list_node *head_node)
   struct rt_entry *rt;
 
   while (!list_is_empty(head_node)) {
-    rt = changelist2rt(head_node->prev);
+    if (0 == (rt = changelist2rt(head_node->prev))) continue;
 #ifdef LINUX_NETLINK_ROUTING
     if (rt->rt_nexthop.iif_index >= 0)
 #endif /*LINUX_NETLINK_ROUTING*/