Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fyixq-0002Bg-8I for pgsql-bugs@arkaria.postgresql.org; Sat, 08 Sep 2018 19:32:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fyixn-0006wu-T8 for pgsql-bugs@arkaria.postgresql.org; Sat, 08 Sep 2018 19:32:11 +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_SHA384:256) (Exim 4.89) (envelope-from ) id 1fyixn-0006wn-N8 for pgsql-bugs@lists.postgresql.org; Sat, 08 Sep 2018 19:32:11 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fyixh-00075k-Gn for pgsql-bugs@lists.postgresql.org; Sat, 08 Sep 2018 19:32:11 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 537D0217D0; Sat, 8 Sep 2018 15:32:03 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Sat, 08 Sep 2018 15:32:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=ndwh873qJlnVsoEK0etwC5hMhoY7INyDkebPrwJUJec=; b=PRY+kXAe EutnjX57iwi6qNTjOY8I1d6a+1g4c2qI8HoA1ZDH0Rb0gTGLP/M5s//17Xr4yI69 MNX0ngBhvkSS1IFC9UwzViB6HSeKOTTPQrlKirPhPkp0mR4zYMMYN4R4XH80t4ZY iO8DFn0QZgjbaWcLQCHGT/NaC+K4jId29QoUcks/xQFIfISG7jvMbx1Agy7OKbI2 6itALhMeeDqQlGASi40Zpc7pIyCxCsZUFpW8KMJOqFij+RumbmxUoUTF43OPTGoZ 8wxKgOeICQuFgELjHVB2dJw4ogX65fqLPjOiqaQhszvZYnV1oQBw1Qn1WV45bxRb XPiCeENJIaNE6Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=ndwh873qJlnVsoEK0etwC5hMhoY7I NyDkebPrwJUJec=; b=g47apjnCgObw7/Ab3e4JzcLHngxQJsUut6n52uKVxaqaV fi07rDC5b1nQ3SAXqwQ/XI7MQ83VDK0sE0hDnYzH/WtIYn/2GhBaO4Va50Y8k/LJ /4sEeIRohUrg5JkDDjOm9uxZx0Tvc2QV456QHzfImE6rS0xHXYP4atgJoxI3z5Ge SZer3TGEE3tteMtDOTzGM+X7T1Q29kwCJ5Uqz30DTCrjDU4NjwDfJ3uy5r6/Opgi 2XZRhiXlIcE2VDyQS49Rjt4CEefEQUNvXNSZU8AyJvSh2pKqLB+W08S0HaicYEQT C8JHHVDCOXOp9gJIOZb/IsDUVsNxdHi5u0fFHQHaw== X-ME-Proxy: X-ME-Sender: Received: from paquier.xyz (unknown [216.9.110.4]) by mail.messagingengine.com (Postfix) with ESMTPA id 021F6E47C7; Sat, 8 Sep 2018 15:32:01 -0400 (EDT) Date: Sat, 8 Sep 2018 12:31:58 -0700 From: Michael Paquier To: Tom Lane Cc: Jeremy Evans , pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15367: Crash in pg_fe_scram_free when using foreign tables Message-ID: <20180908193158.GH32058@paquier.xyz> References: <153626613985.23143.4743626885618266803@wrigleys.postgresql.org> <20180906215836.GP2726@paquier.xyz> <20180906222843.GF17425@jeremyevans.local> <20180907165103.GH17425@jeremyevans.local> <20180907175518.GI17425@jeremyevans.local> <20180907181522.GB32058@paquier.xyz> <20016.1536351535@sss.pgh.pa.us> <20180907204403.GC32058@paquier.xyz> <16558.1536407783@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="SUk9VBj82R8Xhb8H" Content-Disposition: inline In-Reply-To: <16558.1536407783@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --SUk9VBj82R8Xhb8H Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, Sep 08, 2018 at 07:56:23AM -0400, Tom Lane wrote: > Looking closer, there are no leaks, though I think we could use a comment > about that. And it still makes me itch that pg_saslprep (mostly) doesn't > worry about clearing *output on failure while only three of its four > callers bother to initialize their variables to null. That's a recipe > for future bugs. So I propose the attached cleanup. Okay, that looks acceptable to me. Thanks for looking at that. -- Michael --SUk9VBj82R8Xhb8H Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAluUI64ACgkQnvQgOdby QH2Yog//SFxPyI8WpOPOxhOC29M6CcdpHWWUOnCBTkE/BksaQ7FMonP1OiLbYsHe W5eIp3twJvS7aG92WoaOFzXdYJTuSRgkU2uH36DQlGoYD3s5FDwe+T5zUC+aKUuQ 3wTG6j/ZBjcnQMdOQs9Q/oI2lvpSd1IU8siIU8PGpHNeXf4TioKI13TlCOc+dwNr OO9r2cUeAkThbVIO88zjpY38uUw2/lY60aQ5TUy1tdbPMdSzX60GhtXK2o7j2/JZ FATMrb98vDpAyJmEh7zbPy36Ku9G2I0fDJEROo/L5hAy4bALBoBmkbY+hCVHzIMQ Bqt5rvfSvaAsJGwchcN9nyBRR9ZpUJp8hhJk+Pw8ciBPBYloPyn19DyHpsnLrK1W 7OT2E6W2CixHhMadWnRJg1aG1Xpr8+cDeY3neul35OR4PH70in89ZWqBhww90OpT xxUSfKq6qZVBdXhZJWEM/v99Ek/w4EA0GS+s3IH9UYlzGiqQCpW+YRomE3PVcy4I ycYLjwdImuwE5ILrRDVX2dAw+nRn8J8eg+ogm9de0PAusAiXRELAQch3pk7iYD+j e3V7CwlQgQ3b4YsAudCuJsOzKQ0csKov8/4/eQw9YbxP0ksWIdmw/2qqBcqlSqzw E6Pc8fBu9aD4YRnW/q8z1WVFT4LipV/bL2vmj/Wi6jGkyOqnCJI= =g4lV -----END PGP SIGNATURE----- --SUk9VBj82R8Xhb8H--