Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o2HGm-0000Jl-SC for pgsql-hackers@arkaria.postgresql.org; Fri, 17 Jun 2022 19:04:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1o2HFm-000640-Rn for pgsql-hackers@arkaria.postgresql.org; Fri, 17 Jun 2022 19:03:34 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o2HFm-00063q-IT for pgsql-hackers@lists.postgresql.org; Fri, 17 Jun 2022 19:03:34 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o2HFf-0005t3-EN for pgsql-hackers@postgresql.org; Fri, 17 Jun 2022 19:03:33 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 6E1785C01C6; Fri, 17 Jun 2022 15:03:26 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Fri, 17 Jun 2022 15:03:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1655492606; x= 1655579006; bh=v1nJbCvjX9FFR1ynLRZCxugZbhC1Blni47bmLsiXeBo=; b=d aPNEggTucaQADPoBw/idNk4G9vkMUujLS642kMyClnY6nLfrrCzRHwEzcjudk70p LBWbrwYUuvAMRBbF3sJTSZmwvsRr4SVx0zh3ulfIo6niNJQ3fr8eBXggWoN4uUBF yb7rC8QiM1fu13jZJF1PwwjHNG7cb3GvoR6rEQL/K/khhglwBNkUgP7u6NoHNXTp J/O5eHzaFex6U94dy3UME7oOvIlySaYmU/P0DXLhZws568EhPmCJYM7uIwtP+8UJ 0U/F5ChDs55SJnHx2/2+oiHkbN8V+OLzYfWOZDaIiKXcJj3DOC+a6mOWaNriPnHL GpewImM8LJPgNNx+nGUJQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedruddvhedgudeftdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomheprfgv thgvrhcugfhishgvnhhtrhgruhhtuceophgvthgvrhdrvghishgvnhhtrhgruhhtsegvnh htvghrphhrihhsvggusgdrtghomheqnecuggftrfgrthhtvghrnhepheelffeggedujeet iefhleetuddvieffhfffvdejvdffgeejkeduleduheduieefnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepphgvthgvrhdrvghishgvnhhtrhgr uhhtsegvnhhtvghrphhrihhsvggusgdrtghomh X-ME-Proxy: Feedback-ID: i131946ab:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 17 Jun 2022 15:03:25 -0400 (EDT) Message-ID: <5333caf7-7667-bc58-0fd0-2e82eaf01967@enterprisedb.com> Date: Fri, 17 Jun 2022 21:03:23 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: libpq: Remove redundant null pointer checks before free() Content-Language: en-US To: Michael Paquier Cc: pgsql-hackers References: From: Peter Eisentraut In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 17.06.22 05:25, Michael Paquier wrote: > On Thu, Jun 16, 2022 at 10:07:33PM +0200, Peter Eisentraut wrote: >> calls, where the "if" part is unnecessary. This is of course pretty >> harmless, but some functions like scram_free() and freePGconn() have become >> so bulky that it becomes annoying. So while I was doing some work in that >> area I undertook to simplify this. > Seems fine. Would some of the buildfarm dinosaurs hiccup on that? > gaur is one that comes into mind. I'm pretty sure PostgreSQL code already depends on this behavior anyway. The code just isn't consistent about it.