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 1oY2jw-0005wC-P0 for pgsql-hackers@arkaria.postgresql.org; Tue, 13 Sep 2022 10:02:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oY2jv-0005bP-Nf for pgsql-hackers@arkaria.postgresql.org; Tue, 13 Sep 2022 10:01:59 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oY2ju-0005bG-NL for pgsql-hackers@lists.postgresql.org; Tue, 13 Sep 2022 10:01:59 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oY2jq-00020o-SB for pgsql-hackers@lists.postgresql.org; Tue, 13 Sep 2022 10:01:58 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 8C38B5C00FB; Tue, 13 Sep 2022 06:01:49 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Tue, 13 Sep 2022 06:01:49 -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: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=1663063309; x=1663149709; bh=m f58kLyFKQY0+NdQjXmAo+LvbabV0yy/IrytMYWnMfo=; b=RrG7pFAytaFvImPrP n/F5dAtJMODMEsJi10BIZjhrL+Wq4+yw35pyvy2ZtfaYFM2cBEE07KZRsv5bAqVW nl/iE+a8HB7jLZzI1xpw0Op5kpWgS5Y2ZF60ZwX9OH/PS+zJCcO47X1wOOyaSKAY q2+MYEU2jspI1TG17092QeGAJclM/2jP0bNM0OKIzBbN3hWQncpxAJESw3HSEacp xUrO09y/22QIzmgnfcupPabHhUhd/DMUiRMW2tE7AGEGlqoGDApoEuybK17vz6lP K0kQOpR1m1Za4E/ctnfHvOnsGLxChQxX+m/LW/OdiUn6UNOH7NL9qFa2+LDBb9og i56iw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfedugedgvdefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepteejtdehuddutdethffhffekleefueetlefhffeigfei ieehgeeigfeiffejuedvnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomh dprggtthhsohhfghhorhgurdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghr rghmpehmrghilhhfrhhomheprghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 13 Sep 2022 06:01:49 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 2A27638C; Tue, 13 Sep 2022 12:01:47 +0200 (CEST) Date: Tue, 13 Sep 2022 12:01:47 +0200 From: Alvaro Herrera To: Tom Lane Cc: Junwang Zhao , PostgreSQL Hackers Subject: Re: [PATCH v1] fix potential memory leak in untransformRelOptions Message-ID: <20220913100147.zm322p3c2qquru7c@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220909142050.3vv2hjekppk265dd@alvherre.pgsql> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2022-Sep-09, Alvaro Herrera wrote: > Keeping 's' and removing the pstrdups better uses memory, because we > have a single palloc'ed chunk per option rather than two. Pushed. This is pretty much cosmetic, so no backpatch. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "The Gord often wonders why people threaten never to come back after they've been told never to return" (www.actsofgord.com)