summaryrefslogtreecommitdiff
path: root/ext/com_dotnet/com_saproxy.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/com_dotnet/com_saproxy.c')
-rw-r--r--ext/com_dotnet/com_saproxy.c6
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);