Check if colliding task has actually a CHILD, i.e. after a migrate
authorMartin Willi <martin@revosec.ch>
Wed, 1 Jun 2011 13:57:29 +0000 (13:57 +0000)
committerMartin Willi <martin@revosec.ch>
Fri, 3 Jun 2011 08:49:54 +0000 (10:49 +0200)
src/libcharon/sa/tasks/child_rekey.c

index b39a5fc..05db057 100644 (file)
@@ -252,7 +252,10 @@ static child_sa_t *handle_collision(private_child_rekey_t *this)
                        {
                                /* disable close action for the redundand child */
                                child_sa = other->child_create->get_child(other->child_create);
-                               child_sa->set_close_action(child_sa, ACTION_NONE);
+                               if (child_sa)
+                               {
+                                       child_sa->set_close_action(child_sa, ACTION_NONE);
+                               }
                        }
                }
                else