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.
pull/7441/head
Marco Slot 2024-01-23 11:55:03 +01:00 committed by GitHub
parent ee11492a0e
commit 72fbea20c4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}