projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0c3fc09
)
Fix memory leak when deallocating prepared statement in postgres_fdw
author
Michael Paquier
<
[email protected]
>
Tue, 26 Jan 2021 09:43:01 +0000
(18:43 +0900)
committer
Michael Paquier
<
[email protected]
>
Tue, 26 Jan 2021 09:43:01 +0000
(18:43 +0900)
The leak is minor, so no backpatch is done. Oversight in
21734d2
.
Reported-by: Tom Lane
contrib/postgres_fdw/postgres_fdw.c
patch
|
blob
|
blame
|
history
diff --git
a/contrib/postgres_fdw/postgres_fdw.c
b/contrib/postgres_fdw/postgres_fdw.c
index 8648be0b810f929cc922a063f0b501dc9cec8bc4..2ce42ce3f113dd493f6fc7803c6878fe71bf0d0d 100644
(file)
--- a/
contrib/postgres_fdw/postgres_fdw.c
+++ b/
contrib/postgres_fdw/postgres_fdw.c
@@
-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;
}