ikev1: Fix double free when searching for redundant CHILD_SAs
authorTobias Brunner <tobias@strongswan.org>
Fri, 13 Sep 2013 08:14:45 +0000 (10:14 +0200)
committerTobias Brunner <tobias@strongswan.org>
Fri, 13 Sep 2013 08:14:45 +0000 (10:14 +0200)
Fixes #411.

src/libcharon/sa/ikev1/task_manager_v1.c

index d97ef0e..6d4ef14 100644 (file)
@@ -1785,7 +1785,7 @@ static bool have_equal_ts(child_sa_t *child1, child_sa_t *child2, bool local)
        {
                equal = ts1->equals(ts1, ts2);
        }
-       e1->destroy(e1);
+       e2->destroy(e2);
        e1->destroy(e1);
 
        return equal;