diff options
author | Istvan Noszticzius <istvan.noszticzius@oracle.com> | 2014-08-15 16:43:28 +0100 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2014-08-15 16:50:16 +0100 |
commit | 865886553dfb842464600e76b6e8f127b377a1ca (patch) | |
tree | d7671b1e3ede820460a2f3bbc4efd5283d3afa6c /crypto/x509v3/v3_utl.c | |
parent | c753e71e0a0aea2c540dab96fb02c9c62c6ba7a2 (diff) |
Fix use after free bug.
Reviewed-by: Stephen Henson <steve@openssl.org>
Reviewed-by: Emilia Käsper <emilia@openssl.org>
Diffstat (limited to 'crypto/x509v3/v3_utl.c')
-rw-r--r-- | crypto/x509v3/v3_utl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/x509v3/v3_utl.c b/crypto/x509v3/v3_utl.c index 75efd9912a..10a7aa876a 100644 --- a/crypto/x509v3/v3_utl.c +++ b/crypto/x509v3/v3_utl.c @@ -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; } |