mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
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
This commit is contained in:
@ -4063,6 +4063,7 @@ deallocate_query(PgFdwModifyState *fmstate)
|
|||||||
if (PQresultStatus(res) != PGRES_COMMAND_OK)
|
if (PQresultStatus(res) != PGRES_COMMAND_OK)
|
||||||
pgfdw_report_error(ERROR, res, fmstate->conn, true, sql);
|
pgfdw_report_error(ERROR, res, fmstate->conn, true, sql);
|
||||||
PQclear(res);
|
PQclear(res);
|
||||||
|
pfree(fmstate->p_name);
|
||||||
fmstate->p_name = NULL;
|
fmstate->p_name = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user