Free memory in failure case, found by beam.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21126 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2007-06-18 20:19:59 +00:00
parent 23e434119d
commit fd3ca527e1

View File

@@ -64,7 +64,9 @@ gss_set_cred_option (OM_uint32 *minor_status,
mc = malloc(sizeof(*mc));
if (mc == NULL) {
/* XXX free the other mc's */
*cred_handle = (gss_cred_id_t)cred;
gss_release_cred(minor_status, cred_handle);
*minor_status = ENOMEM;
return GSS_S_FAILURE;
}