Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hDupr-00029F-3b for pgsql-committers@arkaria.postgresql.org; Tue, 09 Apr 2019 17:47:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hDupp-0002BE-HG for pgsql-committers@arkaria.postgresql.org; Tue, 09 Apr 2019 17:47:01 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hDupp-0002B7-9u for pgsql-committers@lists.postgresql.org; Tue, 09 Apr 2019 17:47:01 +0000 Received: from mail-qk1-x742.google.com ([2607:f8b0:4864:20::742]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hDupm-0001Tt-5t for pgsql-committers@lists.postgresql.org; Tue, 09 Apr 2019 17:47:00 +0000 Received: by mail-qk1-x742.google.com with SMTP id s81so10764630qke.13 for ; Tue, 09 Apr 2019 10:46:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=SIJQlGFRyB8WaQP7n8vxaaaGIxm3virFzLYH5qXjpik=; b=WE8w05/oJysj2OFoSSavfyChoRYN55ryCxTLQa88qP0vAVxMZ1kwZ0ZxtX9HekVn9A EH+FT0wZD2yLCdh6oo7wiKu+cHxrcsCBRvKE6KTgXQsxqeNvfE4GDR4PZaK6GGwqB2/r yhHhXOHL7us5jJ9Pn92a9dHyerg0PFcMGN1XAG8cL5pYZk2toyLRh84y36DDS4vOx3dF mlrIxPYx0UiKa8vAZUQjixk/NBH1GlMvq4QsePTMN+n95gK+2UYfJCcK2xOPcJ3KMtD3 ZoLPYavR/Kk3648En3T27GzATiuqzyMcI1+o+GV/6hsTASKlHkSf5c8BPFgzWg8pejNx MC3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=SIJQlGFRyB8WaQP7n8vxaaaGIxm3virFzLYH5qXjpik=; b=oLoiSustZdbL329OuNpa3aAdhiqYYnXMRFjP/2zRwxMX806SL3Ctyn77DPLCUetlRa Hhz+1yfh6HaxrhFWUVS+m2UQ0EQJaqTgYPJBCmSP9eNAfSV6G35gnxNjhQXCvb/Gtqww /g1go+Cz8u9UCQTiq+ohH1nV7L+5iPcvmj1a5aQviwYq8wW39QMH5Z3Qml3ogLLj8frT OkXxEDIjm/f6q1vlcJpnF+5HjpwU41Kx7DkBb76H3UrbW8U6nWgrw0/hqKWGIj5krW4z l7OjB8lzajstOzBAZcT5tpV9077ZZ/CVW4OMVlmfeYF39MlxcoKfbzklx1/ctH4fAg2+ BFAg== X-Gm-Message-State: APjAAAVUnnhUkR0uvwbpwracu8KiI0hs6ED3pYD5SoZlqviZa/0TmQSu lyf9kV+ZCsV55nOz+r6XGfwRLQ== X-Google-Smtp-Source: APXvYqyc3BFds8VaTsu2TdBI+EHbejTc5b8u7Ffo8ExaAFvglSVQObgDPeRupfCxeiwKP5SIiRxeiA== X-Received: by 2002:a05:620a:166e:: with SMTP id d14mr30230502qko.30.1554832016118; Tue, 09 Apr 2019 10:46:56 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([190.121.29.3]) by smtp.gmail.com with ESMTPSA id p6sm22626002qtk.70.2019.04.09.10.46.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 09 Apr 2019 10:46:55 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id A0E6B120FC9; Tue, 9 Apr 2019 13:46:53 -0400 (-04) Date: Tue, 9 Apr 2019 13:46:53 -0400 From: Alvaro Herrera To: Fabien COELHO Cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Fix memory leak in pgbench Message-ID: <20190409174653.GA14889@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hello On 2019-Apr-09, Fabien COELHO wrote: > > Fix memory leak in pgbench > > > Commit 25ee70511ec2 introduced a memory leak in pgbench: some PGresult > > structs were not being freed during error bailout, because we're now > > doing more PQgetResult() calls than previously. > > Indeed, I did not consider cleaning up on errors when removing cset, and if > errors are handled somehow it would have caused a problem. > > Thanks for the fix. I could have prepared a patch if told that there was > some problem, but it seems that pg coverity reports are private. They're indeed private. In this case I could have opened it, since the code is unreleased thus there's no security restriction, but since it's so minor I didn't think it worthwhile. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services