mirror of
https://github.com/php/php-src.git
synced 2024-12-12 11:23:53 +08:00
fix mem leak. hash keys dont need to be strdup'ed
This commit is contained in:
parent
2cc1f53f3b
commit
e197ecd16e
@ -1059,7 +1059,7 @@ PHP_FUNCTION(openssl_x509_parse)
|
||||
for (i = 0; i < X509_get_ext_count(cert); i++) {
|
||||
extension = X509_get_ext(cert, i);
|
||||
extdata = X509_EXTENSION_get_data(extension);
|
||||
extname = strdup(OBJ_nid2sn(OBJ_obj2nid(X509_EXTENSION_get_object(extension))));
|
||||
extname = OBJ_nid2sn(OBJ_obj2nid(X509_EXTENSION_get_object(extension)));
|
||||
add_assoc_asn1_string(subitem, extname, extdata);
|
||||
}
|
||||
add_assoc_zval(return_value, "extensions", subitem);
|
||||
|
Loading…
Reference in New Issue
Block a user