cvs: php4 /ext/rpc rpc.c

From: Date: Sun, 09 Feb 2003 23:17:42 +0000
Subject: cvs: php4 /ext/rpc rpc.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-18589@lists.php.net to get a copy of this message
phanto Sun Feb 9 18:17:42 2003 EDT Modified files: /php4/ext/rpc rpc.c Log: fix a memleak Index: php4/ext/rpc/rpc.c diff -u php4/ext/rpc/rpc.c:1.19 php4/ext/rpc/rpc.c:1.20 --- php4/ext/rpc/rpc.c:1.19 Sun Feb 9 16:37:40 2003 +++ php4/ext/rpc/rpc.c Sun Feb 9 18:17:41 2003 @@ -794,12 +794,11 @@ ZEND_API zend_object_value rpc_objects_new(zend_class_entry *class_type TSRMLS_DC) { - zend_object_value *zov; + zend_object_value zov; rpc_internal *intern; /* set up the object value struct */ - zov = (zend_object_value*) pemalloc(sizeof(zend_object_value), TRUE); - zov->handlers = &rpc_handlers; + zov.handlers = &rpc_handlers; /* set up the internal representation of our rpc instance */ intern = (rpc_internal *) pecalloc(1, sizeof(rpc_internal), TRUE); @@ -816,9 +815,9 @@ /* TODO: exception */ } - zov->handle = zend_objects_store_put(intern, rpc_objects_delete, NULL TSRMLS_CC); + zov.handle = zend_objects_store_put(intern, rpc_objects_delete, NULL TSRMLS_CC); - return *zov; + return zov; } /*******************/

« previous php.cvs (#18589) next »