Re: Bug in DefineRange() with multiranges

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Sergey Shinderuk <s.shinderuk@postgrespro.ru>
Cc: Peter Eisentraut <peter.eisentraut@enterprisedb.com>, PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>, Alex Kozhemyakin <a.kozhemyakin@postgrespro.ru>
Date: 2021-10-13T04:21:05Z
Lists: pgsql-hackers
On Tue, Oct 12, 2021 at 08:52:29AM +0300, Sergey Shinderuk wrote:
> Thanks, here is a patch.

Looks fine seen from here, so I'll apply shortly.  I was initially
tempted to do pstrdup() on the object name returned by
QualifiedNameGetCreationNamespace(), but just removing the pfree() is
simpler.   

I got to wonder about similar mistakes from the other callers of
QualifiedNameGetCreationNamespace(), so I have double-checked but
nothing looks wrong.
--
Michael

Commits

  1. Fix use-after-free with multirange types in CREATE TYPE