Return-Path: X-Original-To: apmail-subversion-commits-archive@minotaur.apache.org Delivered-To: apmail-subversion-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3A09910A5D for ; Mon, 13 Jan 2014 12:24:18 +0000 (UTC) Received: (qmail 48612 invoked by uid 500); 13 Jan 2014 12:13:47 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 48512 invoked by uid 500); 13 Jan 2014 12:13:32 -0000 Mailing-List: contact commits-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@subversion.apache.org Delivered-To: mailing list commits@subversion.apache.org Received: (qmail 48441 invoked by uid 99); 13 Jan 2014 12:13:19 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Jan 2014 12:13:19 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Jan 2014 12:13:16 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 7C2C8238889B; Mon, 13 Jan 2014 12:12:55 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1557687 - /subversion/trunk/subversion/libsvn_ra_serf/update.c Date: Mon, 13 Jan 2014 12:12:55 -0000 To: commits@subversion.apache.org From: rhuijben@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140113121255.7C2C8238889B@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: rhuijben Date: Mon Jan 13 12:12:55 2014 New Revision: 1557687 URL: http://svn.apache.org/r1557687 Log: Following up on r1557287, resolve the same leak in the other location where we create temporary buckets to throttle the xml parser. Also avoid using a cleared pool by allocating the serf allocator in the right pool. * subversion/libsvn_ra_serf/update.c (process_pending): Explicitly destroy bucket after passing it to the inner handler. Modified: subversion/trunk/subversion/libsvn_ra_serf/update.c Modified: subversion/trunk/subversion/libsvn_ra_serf/update.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/update.c?rev=1557687&r1=1557686&r2=1557687&view=diff ============================================================================== --- subversion/trunk/subversion/libsvn_ra_serf/update.c (original) +++ subversion/trunk/subversion/libsvn_ra_serf/update.c Mon Jan 13 12:12:55 2014 @@ -2399,12 +2399,13 @@ process_pending(update_delay_baton_t *ud const char *data; apr_size_t len; svn_boolean_t at_eof = FALSE; + serf_bucket_t *tmp_bucket; svn_error_t *err; if (!iterpool) { iterpool = svn_pool_create(scratch_pool); - alloc = serf_bucket_allocator_create(iterpool, NULL, NULL); + alloc = serf_bucket_allocator_create(scratch_pool, NULL, NULL); } else svn_pool_clear(iterpool); @@ -2416,19 +2417,18 @@ process_pending(update_delay_baton_t *ud if (!udb->report->report_received) break; - data = ""; at_eof = TRUE; + tmp_bucket = serf_bucket_simple_create("", 0, NULL, NULL, alloc); } + else + tmp_bucket = svn_ra_serf__create_bucket_with_eagain(data, len, alloc); /* If not at EOF create a bucket that finishes with EAGAIN, otherwise use a standard bucket with default EOF handling */ - err = udb->inner_handler(NULL /* allowed? */, - at_eof - ? serf_bucket_simple_create( - data, len, NULL, NULL, alloc) - : svn_ra_serf__create_bucket_with_eagain( - data, len, alloc), - udb->inner_handler_baton, iterpool); + err = udb->inner_handler(NULL /* allowed? */, tmp_bucket, + udb->inner_handler_baton, iterpool); + + serf_bucket_destroy(tmp_bucket); if (err && APR_STATUS_IS_EAGAIN(err->apr_err)) {