From: Harald Radi Date: Fri, 26 Apr 2002 18:20:45 +0000 (+0000) Subject: this patch should fix a bug where intermediate comvals were not X-Git-Tag: php-4.3.0dev-ZendEngine2-Preview1~415 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=51241dba943130d8909e4c8838a6128bcb5a369d;p=php this patch should fix a bug where intermediate comvals were not released before they were freed. this caused outproc com server to belive that they still referenced even when the php process already terminated. --- diff --git a/ext/com/com.h b/ext/com/com.h index 99c17782df..62d08c3acd 100644 --- a/ext/com/com.h +++ b/ext/com/com.h @@ -30,8 +30,7 @@ END_EXTERN_C() ALLOC_HASHTABLE(properties); \ zend_hash_init(properties, 0, NULL, ZVAL_PTR_DTOR, 0); \ \ - ALLOC_ZVAL(handle); \ - INIT_PZVAL(handle); \ + MAKE_STD_ZVAL(handle); \ ZVAL_LONG(handle, zend_list_insert((o), IS_COM)); \ \ zval_copy_ctor(handle); \ @@ -46,7 +45,7 @@ END_EXTERN_C() #define ALLOC_COM(z) (z) = (comval *) emalloc(sizeof(comval)); \ C_REFCOUNT(z) = 0; -#define FREE_COM(z) efree(z); +#define FREE_COM(z) php_COM_destruct(z TSRMLS_CC); #define IS_COM php_COM_get_le_comval() diff --git a/ext/rpc/com/com_wrapper.h b/ext/rpc/com/com_wrapper.h index 99c17782df..62d08c3acd 100644 --- a/ext/rpc/com/com_wrapper.h +++ b/ext/rpc/com/com_wrapper.h @@ -30,8 +30,7 @@ END_EXTERN_C() ALLOC_HASHTABLE(properties); \ zend_hash_init(properties, 0, NULL, ZVAL_PTR_DTOR, 0); \ \ - ALLOC_ZVAL(handle); \ - INIT_PZVAL(handle); \ + MAKE_STD_ZVAL(handle); \ ZVAL_LONG(handle, zend_list_insert((o), IS_COM)); \ \ zval_copy_ctor(handle); \ @@ -46,7 +45,7 @@ END_EXTERN_C() #define ALLOC_COM(z) (z) = (comval *) emalloc(sizeof(comval)); \ C_REFCOUNT(z) = 0; -#define FREE_COM(z) efree(z); +#define FREE_COM(z) php_COM_destruct(z TSRMLS_CC); #define IS_COM php_COM_get_le_comval()