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 1hEQrS-0006cd-U7 for pgsql-committers@arkaria.postgresql.org; Thu, 11 Apr 2019 03:58:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hEQrR-0002zN-6v for pgsql-committers@arkaria.postgresql.org; Thu, 11 Apr 2019 03:58:49 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hEQrQ-0002zG-TM for pgsql-committers@lists.postgresql.org; Thu, 11 Apr 2019 03:58:49 +0000 Received: from mail-qk1-x742.google.com ([2607:f8b0:4864:20::742]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hEQrO-0005xy-Ex for pgsql-committers@lists.postgresql.org; Thu, 11 Apr 2019 03:58:47 +0000 Received: by mail-qk1-x742.google.com with SMTP id b74so2637172qkg.9 for ; Wed, 10 Apr 2019 20:58:45 -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=y85f7THKDtC4kSAKZu1eBapVxZxv/sg9vAy5shCll5g=; b=TU7w+4d43XenkfeE448WIbegNI8BfrMCvlfh/vkl7wrIHGjfj3xQ97cT0uBRpoa/Jd qqW8KQbJuAsrz5CMEhpA0B6lYgV6qICxJg2R6cdOp8+QTchEPnhWCue9p7LnGxvGGMnO Eaav1Cq/oOPH1QfoX6PwMf5LFrRFah+bu8SIqokQCYXf6YHcwLUixSKMah1L8LPX+T1i x2/QwqhWJseSoh7p0TBREQ0RGB5N4QTVNvu8+3etnRiPaMaKZ9ZYqUpIXkwa+N+WF61b +al/uDnzajux8mvQ6acv37IbOp/0aHZRTDOcPh/H1WIk89zggQJ+rAdOPlJ6AlHZ6+ls KE3w== 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=y85f7THKDtC4kSAKZu1eBapVxZxv/sg9vAy5shCll5g=; b=iH0bhs9UUb8OTMrr1QiNkRBtZeSsehUvZBDvWralZ3G5nnujEBPEy5Y3Qe2jgd0KBo hH9QeIspWOOWLVlc3X90Cc6awMJPjCM+IMl52PHoFJEL5q1n+IZ5RGnchcODk9U0LUwQ mid8gmTbIGVpFNUJtVif7aDA9NmN5ROB6HxDK+Qq731YluKaFCOF4hKb4ea68oTxOxxq v8NseCcBB+qboJ8sx0WJl4k17aFGJ2zxBV1SCYdnI99TNAv6DsvN/PrJqkttZ0CzI5Nx rPFlC+c2HgpueJcUOF6QLi9zvTB1QxkFRqmQGvRuJ6oSXd3aIawaMBy5CWxoVNR5QZar ZLSA== X-Gm-Message-State: APjAAAW/4HWr42XEK+jcKNRUC48oJ+T+udN+rQJR4Mq5DcAvGVKHPhfT AbQuIUW60nAcj1dJR+QXoB6Dog== X-Google-Smtp-Source: APXvYqyLfJGAisO5RbZ5cTjyceYNg4rjbE/GZwB8/SGtYpJSUbA6Yn2rQYX0I85KzR/XSsKv4IExQg== X-Received: by 2002:a05:620a:14bc:: with SMTP id x28mr37604621qkj.221.1554955125358; Wed, 10 Apr 2019 20:58:45 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([201.186.80.67]) by smtp.gmail.com with ESMTPSA id x28sm25709077qtx.71.2019.04.10.20.58.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 10 Apr 2019 20:58:44 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id EC277120F51; Wed, 10 Apr 2019 23:58:41 -0400 (-04) Date: Wed, 10 Apr 2019 23:58:41 -0400 From: Alvaro Herrera To: Masahiko Sawada Cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Fix memory leak in pgbench Message-ID: <20190411035841.GA14826@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 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 On 2019-Apr-10, Masahiko Sawada wrote: > This change leads a compiler warning on my machine: > > pgbench.c: In function ‘readCommandResponse’: > pgbench.c:2730: warning: ISO C90 forbids mixed declarations and code > I think we should declare is_last before doing next_res = PQgetResult(st->con). > > Attached patch fixes it. Thanks, pushed. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services