Skip to content

Commit 7b4c660

Browse files
committed
Fix memory leak when deallocating prepared statement in postgres_fdw
The leak is minor, so no backpatch is done. Oversight in 21734d2. Reported-by: Tom Lane
1 parent 0c3fc09 commit 7b4c660

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

contrib/postgres_fdw/postgres_fdw.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4063,6 +4063,7 @@ deallocate_query(PgFdwModifyState *fmstate)
40634063
if (PQresultStatus(res) != PGRES_COMMAND_OK)
40644064
pgfdw_report_error(ERROR, res, fmstate->conn, true, sql);
40654065
PQclear(res);
4066+
pfree(fmstate->p_name);
40664067
fmstate->p_name = NULL;
40674068
}
40684069

0 commit comments

Comments
 (0)