pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix minor memory leak in pg_basebackup and pg_receivewal
3+ messages / 1 participants
[nested] [flat]

* pgsql: Fix minor memory leak in pg_basebackup and pg_receivewal
@ 2020-04-17 01:47  Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 3+ messages in thread

From: Michael Paquier @ 2020-04-17 01:47 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix minor memory leak in pg_basebackup and pg_receivewal

The result of the query used to retrieve the WAL segment size from the
backend was not getting freed in two code paths.  Both pg_basebackup and
pg_receivewal exit immediately if a failure happened on this query, so
this was not an actual problem, but it could be an issue if this code
gets used for other tools in different ways, be they future tools in
this code tree or external, existing, ones.

Oversight in commit fc49e24, so backpatch down to 11.

Author: Jie Zhang
Discussion: https://postgr.es/m/970ad9508461469b9450b64027842331@G08CNEXMBPEKD06.g08.fujitsu.local
Backpatch-through: 11

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/213e2b7363cd068b9c4481353c3b72729c069b97

Modified Files
--------------
src/bin/pg_basebackup/streamutil.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: Fix minor memory leak in pg_basebackup and pg_receivewal
@ 2020-04-17 01:47  Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 3+ messages in thread

From: Michael Paquier @ 2020-04-17 01:47 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix minor memory leak in pg_basebackup and pg_receivewal

The result of the query used to retrieve the WAL segment size from the
backend was not getting freed in two code paths.  Both pg_basebackup and
pg_receivewal exit immediately if a failure happened on this query, so
this was not an actual problem, but it could be an issue if this code
gets used for other tools in different ways, be they future tools in
this code tree or external, existing, ones.

Oversight in commit fc49e24, so backpatch down to 11.

Author: Jie Zhang
Discussion: https://postgr.es/m/970ad9508461469b9450b64027842331@G08CNEXMBPEKD06.g08.fujitsu.local
Backpatch-through: 11

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/c03356995f861e02bfdf94054092fcbdf3240519

Modified Files
--------------
src/bin/pg_basebackup/streamutil.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: Fix minor memory leak in pg_basebackup and pg_receivewal
@ 2020-04-17 01:47  Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 3+ messages in thread

From: Michael Paquier @ 2020-04-17 01:47 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix minor memory leak in pg_basebackup and pg_receivewal

The result of the query used to retrieve the WAL segment size from the
backend was not getting freed in two code paths.  Both pg_basebackup and
pg_receivewal exit immediately if a failure happened on this query, so
this was not an actual problem, but it could be an issue if this code
gets used for other tools in different ways, be they future tools in
this code tree or external, existing, ones.

Oversight in commit fc49e24, so backpatch down to 11.

Author: Jie Zhang
Discussion: https://postgr.es/m/970ad9508461469b9450b64027842331@G08CNEXMBPEKD06.g08.fujitsu.local
Backpatch-through: 11

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/198efe774b0d2065d828cf7822376a2871c671fc

Modified Files
--------------
src/bin/pg_basebackup/streamutil.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2020-04-17 01:47 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-04-17 01:47 pgsql: Fix minor memory leak in pg_basebackup and pg_receivewal Michael Paquier <michael@paquier.xyz>
2020-04-17 01:47 pgsql: Fix minor memory leak in pg_basebackup and pg_receivewal Michael Paquier <michael@paquier.xyz>
2020-04-17 01:47 pgsql: Fix minor memory leak in pg_basebackup and pg_receivewal Michael Paquier <michael@paquier.xyz>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox