fix mem leak. hash keys dont need to be strdup'ed

This commit is contained in:
Nuno Lopes 2006-09-16 12:05:13 +00:00
parent 2cc1f53f3b
commit e197ecd16e

View File

@ -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);