From commits-return-7746-apmail-apr-commits-archive=apr.apache.org@apr.apache.org Wed Jun 07 01:13:29 2006 Return-Path: Delivered-To: apmail-apr-commits-archive@www.apache.org Received: (qmail 42908 invoked from network); 7 Jun 2006 01:13:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 7 Jun 2006 01:13:29 -0000 Received: (qmail 77091 invoked by uid 500); 7 Jun 2006 01:13:24 -0000 Delivered-To: apmail-apr-commits-archive@apr.apache.org Received: (qmail 77046 invoked by uid 500); 7 Jun 2006 01:13:24 -0000 Mailing-List: contact commits-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: Reply-To: dev@apr.apache.org List-Id: Delivered-To: mailing list commits@apr.apache.org Received: (qmail 77020 invoked by uid 99); 7 Jun 2006 01:13:23 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Jun 2006 18:13:23 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [140.211.166.113] (HELO eris.apache.org) (140.211.166.113) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Jun 2006 18:13:22 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id AC6D91A983A; Tue, 6 Jun 2006 18:13:02 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r412246 - /apr/apr-util/trunk/dbd/apr_dbd_sqlite2.c Date: Wed, 07 Jun 2006 01:13:02 -0000 To: commits@apr.apache.org From: bojan@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20060607011302.AC6D91A983A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: bojan Date: Tue Jun 6 18:13:01 2006 New Revision: 412246 URL: http://svn.apache.org/viewvc?rev=412246&view=rev Log: Don't store -1 into size_t field (a *really* big number on 64-bit machine :-) Free allocated memory, not memory used by the pointer. Modified: apr/apr-util/trunk/dbd/apr_dbd_sqlite2.c Modified: apr/apr-util/trunk/dbd/apr_dbd_sqlite2.c URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/dbd/apr_dbd_sqlite2.c?rev=412246&r1=412245&r2=412246&view=diff ============================================================================== --- apr/apr-util/trunk/dbd/apr_dbd_sqlite2.c (original) +++ apr/apr-util/trunk/dbd/apr_dbd_sqlite2.c Tue Jun 6 18:13:01 2006 @@ -92,17 +92,12 @@ } (*results)->res = result; - if (seek) { - (*results)->ntuples = tuples; - } - else { - (*results)->ntuples = -1; - } + (*results)->ntuples = tuples; (*results)->sz = fields; (*results)->random = seek; if (tuples > 0) - apr_pool_cleanup_register(pool, result, (void *) free, + apr_pool_cleanup_register(pool, *result, (void *) free, apr_pool_cleanup_null); ret = 0;