Skip to content

Commit bc97207

Browse files
committed
Add missing pstrdup
Lifetime of the input string is not right, so create a separate copy. Author: Amit Langote Discussion: https://postgr.es/m/[email protected]
1 parent dfce1f9 commit bc97207

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/backend/commands/tablecmds.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -14568,7 +14568,8 @@ CloneRowTriggersToPartition(Relation parent, Relation partition)
1456814568

1456914569
col = TupleDescAttr(parent->rd_att,
1457014570
trigForm->tgattr.values[i] - 1);
14571-
cols = lappend(cols, makeString(NameStr(col->attname)));
14571+
cols = lappend(cols,
14572+
makeString(pstrdup(NameStr(col->attname))));
1457214573
}
1457314574
}
1457414575

0 commit comments

Comments
 (0)