diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2020-08-26 15:40:57 +0200 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2020-08-26 15:40:57 +0200 |
commit | 8e2f219fad5dba2c4c5f83bcc770df5697cb71d3 (patch) | |
tree | 4880852c7fc614eac3ca67477f0d516a84e1237c | |
parent | b087bd2404a154840685066a034581bce6e7e81e (diff) | |
parent | 1b7ee6db884b7574893bc737a6f7fb5fdf9d619b (diff) | |
download | php-git-8e2f219fad5dba2c4c5f83bcc770df5697cb71d3.tar.gz |
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix com_safearray_proxy related memory management issues
-rw-r--r-- | ext/com_dotnet/com_saproxy.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/com_dotnet/com_saproxy.c b/ext/com_dotnet/com_saproxy.c index 5f43c9fe25..8369a4bcdd 100644 --- a/ext/com_dotnet/com_saproxy.c +++ b/ext/com_dotnet/com_saproxy.c @@ -115,6 +115,8 @@ static zval *saproxy_read_dimension(zval *object, zval *offset, int type, zval * Z_STRLEN(proxy->indices[0]), DISPATCH_METHOD|DISPATCH_PROPERTYGET, &v, proxy->dimensions, args, 0); + efree(args); + if (res == SUCCESS) { php_com_zval_from_variant(rv, &v, proxy->obj->code_page); VariantClear(&v); @@ -390,7 +392,7 @@ static zend_object* saproxy_clone(zval *object) memcpy(cloneproxy, proxy, sizeof(*cloneproxy)); Z_ADDREF_P(cloneproxy->zobj); - cloneproxy->indices = safe_emalloc(cloneproxy->dimensions, sizeof(zval *), 0); + cloneproxy->indices = safe_emalloc(cloneproxy->dimensions, sizeof(zval), 0); clone_indices(cloneproxy, proxy, proxy->dimensions); return &cloneproxy->std; @@ -440,7 +442,7 @@ int php_com_saproxy_create(zval *com_object, zval *proxy_out, zval *index) } Z_ADDREF_P(proxy->zobj); - proxy->indices = safe_emalloc(proxy->dimensions, sizeof(zval *), 0); + proxy->indices = safe_emalloc(proxy->dimensions, sizeof(zval), 0); if (rel) { clone_indices(proxy, rel, rel->dimensions); |