fixed destruction of generalNames linked list
[strongswan.git] / src / libstrongswan / crypto / x509.c
index d793d66..c0eec82 100755 (executable)
@@ -1302,8 +1302,8 @@ chunk_t x509_build_generalNames(linked_list_t *list)
                        free(generalName);
                }
                iterator->destroy(iterator);
-               generalNames->destroy(generalNames);
        }
+       generalNames->destroy(generalNames);
        return names;
 }