fixed sender destruction order
authorMartin Willi <martin@strongswan.org>
Wed, 5 Nov 2008 12:24:36 +0000 (12:24 -0000)
committerMartin Willi <martin@strongswan.org>
Wed, 5 Nov 2008 12:24:36 +0000 (12:24 -0000)
src/charon/network/sender.c

index 388dbd8..560df41 100644 (file)
@@ -122,11 +122,11 @@ static void destroy(private_sender_t *this)
                this->sent->wait(this->sent, this->mutex);
        }
        this->mutex->unlock(this->mutex);
+       this->job->cancel(this->job);
+       this->list->destroy(this->list);
        this->got->destroy(this->got);
        this->sent->destroy(this->sent);
        this->mutex->destroy(this->mutex);
-       this->job->cancel(this->job);
-       this->list->destroy(this->list);
        free(this);
 }