Skip to content

Commit d4a1c92

Browse files
Ilia Evdokimovhackorum
authored andcommitted
After concatenation two lists where the second one is from list_copy_tail do not free it
1 parent db0c984 commit d4a1c92

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

src/backend/parser/analyze.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2294,6 +2294,8 @@ transformSetOperationStmt(ParseState *pstate, SelectStmt *stmt)
22942294
NULL,
22952295
false);
22962296

2297+
list_free(targetnames);
2298+
22972299
sv_namespace = pstate->p_namespace;
22982300
pstate->p_namespace = NIL;
22992301

src/backend/parser/parse_clause.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1728,6 +1728,8 @@ transformFromClauseItem(ParseState *pstate, Node *n,
17281728
j->alias,
17291729
true);
17301730

1731+
list_free(res_colnames);
1732+
17311733
/* Verify that we correctly predicted the join's RT index */
17321734
Assert(j->rtindex == nsitem->p_rtindex);
17331735
/* Cross-check number of columns, too */

0 commit comments

Comments
 (0)