]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
fixed memleak in rekey collissions
authorMartin Willi <martin@strongswan.org>
Thu, 3 Sep 2009 16:09:29 +0000 (18:09 +0200)
committerMartin Willi <martin@strongswan.org>
Thu, 3 Sep 2009 16:09:29 +0000 (18:09 +0200)
src/charon/sa/tasks/child_rekey.c

index ff018d3f3d5252a0cbd2711972bcc7675f53579c..06027d1126f2fdf3d676b8f2b3ea42f57afb183b 100644 (file)
@@ -329,6 +329,7 @@ static void collide(private_child_rekey_t *this, task_t *other)
                if (rekey == NULL || rekey->child_sa != this->child_sa)
                {
                        /* not the same child => no collision */
+                       other->destroy(other);
                        return;
                }
        }
@@ -338,12 +339,14 @@ static void collide(private_child_rekey_t *this, task_t *other)
                if (del == NULL || del->get_child(del) != this->child_sa)
                {
                        /* not the same child => no collision */ 
+                       other->destroy(other);
                        return;
                }
        }
        else
        {
                /* any other task is not critical for collisisions, ignore */
+               other->destroy(other);
                return;
        }
        DESTROY_IF(this->collision);