cleanup
authorLuke Howard <lukeh@padl.com>
Sat, 11 Sep 2010 09:00:21 +0000 (11:00 +0200)
committerLuke Howard <lukeh@padl.com>
Sat, 11 Sep 2010 09:00:21 +0000 (11:00 +0200)
mech_eap/util_name.c
mech_eap/util_radius.c
mech_eap/util_radius.h
mech_eap/util_saml.c
mech_eap/util_saml.h

index 5b4491d..f3dddf2 100644 (file)
@@ -106,8 +106,8 @@ gssEapReleaseName(OM_uint32 *minor, gss_name_t *pName)
     GSSEAP_KRB_INIT(&krbContext);
     krb5_free_principal(krbContext, name->krbPrincipal);
 
-    radiusFreeAVPs(&tmpMinor, name->avps);
-    samlFreeAssertion(&tmpMinor, name->assertion);
+    radiusReleaseAVPs(&tmpMinor, &name->avps);
+    samlReleaseAssertion(&tmpMinor, &name->assertion);
 
     GSSEAP_MUTEX_DESTROY(&name->mutex);
     GSSEAP_FREE(name);
index f417983..0c9c6e3 100644 (file)
@@ -44,11 +44,12 @@ radiusDuplicateAVPs(OM_uint32 *minor,
 }
 
 OM_uint32
-radiusFreeAVPs(OM_uint32 *minor,
-               struct eap_gss_avp_list *avps)
+radiusReleaseAVPs(OM_uint32 *minor,
+                  struct eap_gss_avp_list **avps)
 {
-    if (avps != NULL) {
+    if (*avps != NULL) {
         GSSEAP_NOT_IMPLEMENTED;
+        *avps = NULL;
     }
 }
 
index 154529e..4f9a841 100644 (file)
@@ -43,8 +43,8 @@ radiusDuplicateAVPs(OM_uint32 *minor,
                     struct eap_gss_avp_list **out);
 
 OM_uint32
-radiusFreeAVPs(OM_uint32 *minor,
-               struct eap_gss_avp_list *in);
+radiusReleaseAVPs(OM_uint32 *minor,
+                  struct eap_gss_avp_list **avps);
 
 OM_uint32
 radiusGetAttributeTypes(OM_uint32 *minor,
index f668c8f..e86b232 100644 (file)
@@ -41,11 +41,12 @@ samlDuplicateAssertion(OM_uint32 *minor,
 }
 
 OM_uint32
-samlFreeAssertion(OM_uint32 *minor,
-                  struct eap_gss_saml_assertion *assertion)
+samlReleaseAssertion(OM_uint32 *minor,
+                     struct eap_gss_saml_assertion **assertion)
 {
-    if (assertion != NULL) {
+    if (*assertion != NULL) {
         GSSEAP_NOT_IMPLEMENTED;
+        *assertion = NULL;
     }
 }
 
index 283ce60..300f822 100644 (file)
@@ -53,8 +53,8 @@ samlExportAssertion(OM_uint32 *minor,
                     gss_buffer_t buffer);
 
 OM_uint32
-samlFreeAssertion(OM_uint32 *minor,
-                  struct eap_gss_saml_assertion *assertion);
+samlReleaseAssertion(OM_uint32 *minor,
+                     struct eap_gss_saml_assertion **assertion);
 
 OM_uint32
 samlGetAttributeTypes(OM_uint32 *minor,