mirror of
https://github.com/openssl/openssl.git
synced 2024-11-27 05:21:51 +08:00
Fix use after free bug.
Reviewed-by: Stephen Henson <steve@openssl.org> Reviewed-by: Emilia Käsper <emilia@openssl.org>
This commit is contained in:
parent
c753e71e0a
commit
865886553d
@ -879,9 +879,9 @@ static int do_check_string(ASN1_STRING *a, int cmp_type, equal_fn equal,
|
||||
if (astrlen < 0)
|
||||
return -1;
|
||||
rv = equal(astr, astrlen, (unsigned char *)b, blen, flags);
|
||||
OPENSSL_free(astr);
|
||||
if (rv > 0 && peername)
|
||||
*peername = BUF_strndup((char *)astr, astrlen);
|
||||
OPENSSL_free(astr);
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user