Commit 7b4c6604 authored by Michael Paquier's avatar Michael Paquier

Fix memory leak when deallocating prepared statement in postgres_fdw

The leak is minor, so no backpatch is done.  Oversight in 21734d2f.

Reported-by: Tom Lane
parent 0c3fc09f
......@@ -4063,6 +4063,7 @@ deallocate_query(PgFdwModifyState *fmstate)
if (PQresultStatus(res) != PGRES_COMMAND_OK)
pgfdw_report_error(ERROR, res, fmstate->conn, true, sql);
PQclear(res);
pfree(fmstate->p_name);
fmstate->p_name = NULL;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment