ID: 10029
Updated by: zeev
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: Unknown/Other Function
PHP Version: 4.0.4pl1
Assigned To: 
Comments:

zend_plist_delete() was redundant and removed from the CVS a few weeks ago (it didn't 
make it for 4.0.5, but will be in 4.0.6)

Previous Comments:
---------------------------------------------------------------------------

[2001-03-27 13:54:23] [EMAIL PROTECTED]
from Zend/zend_list.c

Note that list is passed in, but &EG(regular_list) is used wherever list should be 
used.

static inline int zend_list_do_delete(HashTable *list,int id)
{
        zend_rsrc_list_entry *le;
        ELS_FETCH();
        
        if (zend_hash_index_find(&EG(regular_list), id, (void **) &le)==SUCCESS) {
/*              printf("del(%d): %d->%dn", id, le->refcount, le->refcount-1); */
                if (--le->refcount<=0) {
                        return zend_hash_index_del(&EG(regular_list), id);
                } else {
                        return SUCCESS;
                }
        } else {
                return FAILURE;
        }
}

.
.
.

Scroll down, and we see that both zend_list_delete and zend_plist_delete are calling 
this with different hashtable args.  It looks as though we must be leaking memory 
whenever zend_plist_delete is called.

ZEND_API int zend_list_delete(int id)
{
        ELS_FETCH();

        return zend_list_do_delete(&EG(regular_list), id);
}


ZEND_API int zend_plist_delete(int id)
{
        ELS_FETCH();

        return zend_list_do_delete(&EG(persistent_list), id);
}

---------------------------------------------------------------------------



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10029&edit=2


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to