2005-09-21 Tom Yu <tlyu@mit.edu>
+ * import_name.c (krb5_gss_import_name): Add missing free of tmp in
+ an error case to fix a memory leak.
+
+ * inq_cred.c (krb5_gss_inquire_cred): Memory leak fixes: call
+ krb5_gss_release_cred() with address of cred, not cred; add
+ missing call to krb5_gss_release_cred() in an error case.
+
* duplicate_name.c (krb5_gss_duplicate_name):
* export_name.c (krb5_gss_export_name): Fix gsstest nit by
clearing minor_status if no errors.
if (name) {
if (ret_name != NULL && ! kg_save_name((gss_name_t) ret_name)) {
k5_mutex_unlock(&cred->lock);
+ if (cred_handle == GSS_C_NO_CREDENTIAL)
+ krb5_gss_release_cred(minor_status, (gss_cred_id_t)&cred);
+
(void) gss_release_oid_set(minor_status, &mechs);
krb5_free_principal(context, ret_name);
*minor_status = (OM_uint32) G_VALIDATE_FAILED;
*mechanisms = mechs;
if (cred_handle == GSS_C_NO_CREDENTIAL)
- krb5_gss_release_cred(minor_status, (gss_cred_id_t)cred);
+ krb5_gss_release_cred(minor_status, (gss_cred_id_t)&cred);
krb5_free_context(context);
*minor_status = 0;
if (cred_handle == GSS_C_NO_CREDENTIAL) {
OM_uint32 tmp_min_stat;
- krb5_gss_release_cred(&tmp_min_stat, (gss_cred_id_t)cred);
+ krb5_gss_release_cred(&tmp_min_stat, (gss_cred_id_t)&cred);
}
krb5_free_context(context);
return ret;