summaryrefslogtreecommitdiff
path: root/src/charon/credentials/auth_info.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/charon/credentials/auth_info.c')
-rw-r--r--src/charon/credentials/auth_info.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/charon/credentials/auth_info.c b/src/charon/credentials/auth_info.c
index 028ca35c9..ed725b889 100644
--- a/src/charon/credentials/auth_info.c
+++ b/src/charon/credentials/auth_info.c
@@ -13,7 +13,7 @@
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
- * $Id: auth_info.c 4276 2008-08-22 10:44:51Z martin $
+ * $Id: auth_info.c 4774 2008-12-09 14:34:15Z martin $
*/
@@ -560,9 +560,9 @@ static void destroy_item_value(item_t *item)
}
/**
- * Implementation of auth_info_t.destroy
+ * Implementation of auth_info_t.purge
*/
-static void destroy(private_auth_info_t *this)
+static void purge(private_auth_info_t *this)
{
item_t *item;
@@ -571,6 +571,14 @@ static void destroy(private_auth_info_t *this)
destroy_item_value(item);
free(item);
}
+}
+
+/**
+ * Implementation of auth_info_t.destroy
+ */
+static void destroy(private_auth_info_t *this)
+{
+ purge(this);
this->items->destroy(this->items);
free(this);
}
@@ -588,6 +596,7 @@ auth_info_t *auth_info_create()
this->public.create_item_enumerator = (enumerator_t*(*)(auth_info_t*))create_item_enumerator;
this->public.complies = (bool(*)(auth_info_t*, auth_info_t *))complies;
this->public.merge = (void(*)(auth_info_t*, auth_info_t *other))merge;
+ this->public.purge = (void(*)(auth_info_t*))purge;
this->public.equals = (bool(*)(auth_info_t*, auth_info_t *other))equals;
this->public.destroy = (void(*)(auth_info_t*))destroy;