From 6c548f07d2a254da46cd0b6f6e99b7ed24a6b811 Mon Sep 17 00:00:00 2001 From: Sergey Shinderuk Date: Tue, 12 Oct 2021 07:57:42 +0300 Subject: [PATCH] Fix premature pfree() of multirange_type_name in DefineRange() If the mutlirange_type_name parameter is given in the query, this would erroneously pfree() the string in the parse tree. Oversight in 6df7a9698bb0. --- src/backend/commands/typecmds.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/backend/commands/typecmds.c b/src/backend/commands/typecmds.c index b290629a450..9ab40341793 100644 --- a/src/backend/commands/typecmds.c +++ b/src/backend/commands/typecmds.c @@ -1707,7 +1707,6 @@ DefineRange(ParseState *pstate, CreateRangeStmt *stmt) /* Create cast from the range type to its multirange type */ CastCreate(typoid, multirangeOid, castFuncOid, 'e', 'f', DEPENDENCY_INTERNAL); - pfree(multirangeTypeName); pfree(multirangeArrayName); return address; -- 2.24.3 (Apple Git-128)