Fix memory leak in _gss_ntlm_release_cred.
ntlm_cred is always allocated with calloc, so we need to free the cred object too, similarly to what _gsskrb5_release_cred does.
This commit is contained in:

committed by
Nico Williams

parent
23ad4341f8
commit
a666bf165e
@@ -58,6 +58,9 @@ OM_uint32 GSSAPI_CALLCONV _gss_ntlm_release_cred
|
|||||||
free(cred->key.data);
|
free(cred->key.data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
memset(cred, 0, sizeof(*cred));
|
||||||
|
free(cred);
|
||||||
|
|
||||||
return GSS_S_COMPLETE;
|
return GSS_S_COMPLETE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user