fixed memory leak
authorAndreas Steffen <andreas.steffen@strongswan.org>
Tue, 16 Nov 2010 20:37:38 +0000 (21:37 +0100)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Tue, 16 Nov 2010 20:37:38 +0000 (21:37 +0100)
src/libcharon/plugins/tnc_imv/tnc_imv_recommendations.c

index fb76d00..5e8eccf 100644 (file)
@@ -328,7 +328,7 @@ METHOD(recommendations_t, destroy, void,
 {
        recommendation_entry_t *entry;
 
-       while (this->recs->remove_last(this->recs, (void**)&entry))
+       while (this->recs->remove_last(this->recs, (void**)&entry) == SUCCESS)
        {
                free(entry->reason.ptr);
                free(entry->reason_language.ptr);