Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:19945 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 61919 invoked by uid 1010); 10 Nov 2005 10:54:32 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 61901 invoked from network); 10 Nov 2005 10:54:32 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Nov 2005 10:54:32 -0000 X-Host-Fingerprint: 64.233.184.204 wproxy.gmail.com Linux 2.4/2.6 Received: from ([64.233.184.204:60243] helo=wproxy.gmail.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 13/52-45231-8E623734 for ; Thu, 10 Nov 2005 05:54:32 -0500 Received: by wproxy.gmail.com with SMTP id i24so331837wra for ; Thu, 10 Nov 2005 02:54:28 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=A87pg4o2F7PLAYJ5HX+UtDxm/XzqUsoy4nFWwCuNbChTcof5mPk271CWk5qusftMQ+29O5Lo48yNKk9KJlWE6GsMgqXV493eqkUZxtY5w48dwk7ohH2Htkmk2iIK0Xlzrw6VYv/OqYPZ+ZM+xJH4SaKxumwU7xaIdoXQTgRoJYg= Received: by 10.54.123.19 with SMTP id v19mr495876wrc; Thu, 10 Nov 2005 02:54:26 -0800 (PST) Received: by 10.54.76.6 with HTTP; Thu, 10 Nov 2005 02:54:26 -0800 (PST) Message-ID: <4e89b4260511100254q54f2b199m4146079115757cc8@mail.gmail.com> Date: Thu, 10 Nov 2005 05:54:26 -0500 To: Marco Bambini Cc: internals@lists.php.net In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: Subject: Re: [PHP-DEV] Correct use of zend_list_delete From: kingwez@gmail.com (Wez Furlong) On 11/9/05, Marco Bambini wrote: > ZEND_FUNCTION(rsql_disconnect) > { > ... > ZEND_FETCH_RESOURCE2(rsqldb, void*, theConnectionParameter, -1, > kConnIDString, rsql_connection, rsql_pconnection); > if (rsqldb) zend_list_delete(Z_LVAL_PP(theConnectionParameter)); > if (rsqldb) myCustomFree(rsqldb); Removing the call to myCustomFree should solve your problem; the list destructor is calling it once for you, and you're then trying to free somthing that is no longer valid. --Wez