zend_hash_str_update(Z_ARRVAL(subitem), sname, strlen(sname), &tmp);
}
} else {
+ /* it might be better to expand it and pass zval from ZVAL_STRING
+ * to zend_symtable_str_update so we do not silently drop const
+ * but we need a test to cover this part first */
add_assoc_stringl(&subitem, sname, (char *)to_add, to_add_len);
}
+ } else {
+ php_openssl_store_errors();
}
- if (needs_free) {
- /* ASN1_STRING_to_UTF8(3): The buffer out should be freed using free(3) */
- OPENSSL_free(to_add);
+ if (to_add_buf != NULL) {
+ OPENSSL_free(to_add_buf);
}
}