Re: [PATCH]Memory leaking when calling an overloaded class member

From: Date: Thu, 02 May 2002 00:10:41 +0000
Subject: Re: [PATCH]Memory leaking when calling an overloaded class member
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-83579@lists.php.net to get a copy of this message
Ignore the patch.... I really should compile and test the patch before i submit it.. It sill is a leak tho.. Ill repatch... Ill also test it this time :) - brad --- brad lafountain <rodif_bl@yahoo.com> wrote: > I get this error: > > f:\php-4.2.0\zend\zend_execute.c(1503) : Freeing 0x00DDD278 (11 bytes), > script=test2.php > f:\php-4.2.0\zend\zend_variables.c(106) : Actual location (location was > relayed) > Last leak repeated 1 time > > i took alook at the code.. > > here is where it creates the memory > tmp = *function_name; > zval_copy_ctor(&tmp); > > > here shoud be the delete.. > zval_dtor(&tmp); > EX(fbc) = function; > overloaded_function_call_cont: > FREE_OP(EX(Ts), &EX(opline)->op2, EG(free_op2)); > > but as you see the goto overloaded_function_call_cont; > skips the free. > > Patch is supplied > > _brad_ > > > > __________________________________________________ > Do You Yahoo!? > Yahoo! Health - your guide to health and wellness > http://health.yahoo.com> --- zend_execute_cvs.c Wed May 1 > 19:22:11 2002 > +++ zend_execute.c Wed May 1 19:22:53 2002 > @@ -1563,9 +1563,9 @@ > if (zend_hash_find(active_function_table, function_name->value.str.val, > function_name->value.str.len+1, (void **) &function)==FAILURE) { > zend_error(E_ERROR, "Call to undefined function: %s()", > function_name->value.str.val); > } > - zval_dtor(&tmp); > EX(fbc) = function; > overloaded_function_call_cont: > + zval_dtor(&tmp); > FREE_OP(EX(Ts), &EX(opline)->op2, EG(free_op2)); > } > NEXT_OPCODE(); > > > -- > PHP Development Mailing List <http://www.php.net/> > To unsubscribe, visit: http://www.php.net/unsub.php __________________________________________________ Do You Yahoo!? Yahoo! Health - your guide to health and wellness http://health.yahoo.com

« previous php.dev (#83579) next »