From: Martin Willi Date: Thu, 3 Sep 2009 16:09:29 +0000 (+0200) Subject: fixed memleak in rekey collissions X-Git-Tag: 4.3.5rc1~240 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd2b6f3073a82be6547abd75a229b42c17592cbd;p=thirdparty%2Fstrongswan.git fixed memleak in rekey collissions --- diff --git a/src/charon/sa/tasks/child_rekey.c b/src/charon/sa/tasks/child_rekey.c index ff018d3f3d..06027d1126 100644 --- a/src/charon/sa/tasks/child_rekey.c +++ b/src/charon/sa/tasks/child_rekey.c @@ -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);