mirror of https://github.com/citusdata/citus.git
Replace spurious strdup with pstrdup (#7440)
Not sure why we never found this using valgrind, but using strdup will
cause memory leaks because the pointer is not tracked in a memory
context.
(cherry picked from commit 72fbea20c4
)
pull/7583/head
parent
7c8f50e052
commit
4d064ce84b
|
@ -433,7 +433,7 @@ CreateTargetEntryForColumn(Form_pg_attribute attributeTuple, Index rteIndex,
|
|||
attributeTuple->atttypmod, attributeTuple->attcollation, 0);
|
||||
TargetEntry *targetEntry =
|
||||
makeTargetEntry((Expr *) targetColumn, resno,
|
||||
strdup(attributeTuple->attname.data), false);
|
||||
pstrdup(attributeTuple->attname.data), false);
|
||||
return targetEntry;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue