Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:15586 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 46847 invoked by uid 1010); 24 Mar 2005 17:34:21 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 46766 invoked by uid 1007); 24 Mar 2005 17:34:14 -0000 Message-ID: <20050324173414.46765.qmail@lists.php.net> To: internals@lists.php.net References: <65530d4805032406443f9d0fb@mail.gmail.com> <1099660230.20050324163835@marcus-boerger.de> Date: Thu, 24 Mar 2005 09:34:13 -0800 Lines: 21 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1478 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1478 X-Posted-By: 169.229.139.92 Subject: Re: [PHP-DEV] zend_list_delete From: pollita@php.net ("Sara Golemon") > > 1 ZEND_FETCH_RESOURCE(ftp, ftpbuf_t*, &z_ftp, -1, le_ftpbuf_name, le_ftpbuf); > > 2 zend_list_delete(Z_LVAL_P(z_ftp)) > > 3 efree(ftp) > > Line three is wrong it should be > zval_ptr_dtor(&z_ftp) > and no, it doesn't make the efree()/zval_ptr_dtor() redundant. > It only frees the members but doesn't care for the zval. > For that matter, it should *only* be zval_ptr_dtor(&z_ftp) since in the process of dtoring the zval the list entry is delref'd (what list_delete actually does) anyway. Of course, my question for you would be. Is that *literally* how your code looks? I.e. You fetch a resource immediately before destroying it? Or are you just condensing for brevity? -Sara