gss/mech: fix make_sasl_name ctx leak
The EVP_MD_CTX created in make_sasl_name() must be destroyed to prevent a memory allocation leak. Change-Id: I0b7f5b1b0f4f252bfcdaec755d09ed75de505f75
This commit is contained in:
@@ -203,6 +203,7 @@ make_sasl_name(OM_uint32 *minor, const gss_OID mech, char sasl_name[16])
|
||||
EVP_DigestUpdate(ctx, hdr, 2);
|
||||
EVP_DigestUpdate(ctx, mech->elements, mech->length);
|
||||
EVP_DigestFinal_ex(ctx, hash, NULL);
|
||||
EVP_MD_CTX_destroy(ctx);
|
||||
|
||||
memcpy(p, "GS2-", 4);
|
||||
p += 4;
|
||||
|
Reference in New Issue
Block a user