Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id EDD50200B72 for ; Fri, 26 Aug 2016 13:30:02 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id EC31E160AB6; Fri, 26 Aug 2016 11:30:02 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 40834160AB0 for ; Fri, 26 Aug 2016 13:30:02 +0200 (CEST) Received: (qmail 43612 invoked by uid 500); 26 Aug 2016 11:30:01 -0000 Mailing-List: contact dev-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@subversion.apache.org Received: (qmail 43602 invoked by uid 99); 26 Aug 2016 11:30:01 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Aug 2016 11:30:01 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 985BCC864F for ; Fri, 26 Aug 2016 11:30:00 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.821 X-Spam-Level: X-Spam-Status: No, score=-0.821 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=visualsvn.com Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id MqX5CZBlk0Hs for ; Fri, 26 Aug 2016 11:29:57 +0000 (UTC) Received: from mail-wm0-f51.google.com (mail-wm0-f51.google.com [74.125.82.51]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id D9EEA5FC14 for ; Fri, 26 Aug 2016 11:29:56 +0000 (UTC) Received: by mail-wm0-f51.google.com with SMTP id o80so114627198wme.1 for ; Fri, 26 Aug 2016 04:29:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=visualsvn.com; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ZiqXDWy62RV8us9nupajUn8sr/Y8MNrlwojtspqIZGs=; b=RjV4GKNbNJ2a/B1NtzMp4zm3GzseNQ0uonFKNDAeylRgksM+iJnlaATj+WmMkVsUYf Hl/l7/1tgwW6PFw+d7AhjxD0XxlbqD922E8awqgLyeOSHI2kH1jqTY4vSuT4Yc9MsuSO 1+aOjFlH6lsjePw+mFpUZ/wGmW+vyCwBs7GaM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ZiqXDWy62RV8us9nupajUn8sr/Y8MNrlwojtspqIZGs=; b=aYhlVKYZvzVbZV0a23crKtIRwJQS4T6dAE/in3kF/uw/DRpaRiEDY4Oq/MWjGan+TM rIwmNoJ6OQReqejy8G5Wiq+8oRX0zVUBbcUEGC06IBLwSowcePhpnK2q3VxAxDA8XJsH YACy5VzkkTxdf+kr0k4Lay80svO2c1AtHc4yKE6UxxmD1mYY8PhzpPQKZ6wPy18NvWQJ sZowA8T3Bok80v9LR7KCaqbvXS+7hv4gcQqGiS7LbXHV0aN1P6NllZ/2dqSkYp/bf3fF Ev2tBUrIqz7yz4/pen7fyAJaHWsoOimGqf85/A2aaz1KYZLzgBrcxAGpr8VJodm/MuJc gzFA== X-Gm-Message-State: AE9vXwMyLsGJvWkk4GIBvSX+IS9DLsrJOw9Ch5Ty3yBfGCGsGWe3hzcqjSNkFiipko8YzGEAatlEyu80pT0YfAfX X-Received: by 10.194.139.236 with SMTP id rb12mr3180686wjb.101.1472210995856; Fri, 26 Aug 2016 04:29:55 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.188.196 with HTTP; Fri, 26 Aug 2016 04:29:35 -0700 (PDT) In-Reply-To: References: <20160824144322.8E4FD3A02E6@svn01-us-west.apache.org> From: Ivan Zhakov Date: Fri, 26 Aug 2016 14:29:35 +0300 Message-ID: Subject: Re: svn commit: r1757532 - /subversion/trunk/subversion/mod_dav_svn/repos.c To: Evgeny Kotkov Cc: Subversion Development Content-Type: text/plain; charset=UTF-8 archived-at: Fri, 26 Aug 2016 11:30:03 -0000 On 26 August 2016 at 14:27, Evgeny Kotkov wrote: > Ivan Zhakov writes: > >>> @@ -3266,15 +3264,13 @@ static svn_error_t * __attribute__((war >>> close_filter(void *baton) >>> { >>> diff_ctx_t *dc = baton; >>> - apr_bucket_brigade *bb; >>> apr_bucket *bkt; >>> apr_status_t status; >>> >>> /* done with the file. write an EOS bucket now. */ >>> - bb = apr_brigade_create(dc->pool, dc->output->c->bucket_alloc); >>> bkt = apr_bucket_eos_create(dc->output->c->bucket_alloc); >>> - APR_BRIGADE_INSERT_TAIL(bb, bkt); >>> - if ((status = ap_pass_brigade(dc->output, bb)) != APR_SUCCESS) >>> + APR_BRIGADE_INSERT_TAIL(dc->bb, bkt); >>> + if ((status = ap_pass_brigade(dc->output, dc->bb)) != APR_SUCCESS) >>> return svn_error_create(status, NULL, "Could not write EOS to filter"); >>> >> As far I understand apr_brigade_cleanup() should be called after >> ap_pass_brigade(). So code should be something like: >> [[[ >> APR_BRIGADE_INSERT_TAIL(dc->bb, bkt); >> status = ap_pass_brigade(dc->output, dc->bb); >> apr_brigade_cleanup(dc->bb); >> if (status != APR_SUCCESS) >> return svn_error_create(status, NULL, "Could not write EOS to filter"); >> ]]] > > Thanks, I will add the missing call in trunk. > > While it's not strictly required here (this is the stream's close_fn(), and > we always call apr_brigade_destroy() upon returning from the deliver() > hook), this may not hold in the future. Or someone might improperly use > this code as a reference. > Ok, thanks! I added my +1 for backport anyway, since there is no actual problem/memory leak in this particular case. -- Ivan Zhakov