pgsql: Fix memory leak in syslogger: logfile_rotate() would leak a copy

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix memory leak in syslogger: logfile_rotate() would leak a copy
Date: 2009-11-19 02:45:50
Message-ID: 20091119024550.46AD1753FB7@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Fix memory leak in syslogger: logfile_rotate() would leak a copy of the
output filename if CSV logging was enabled and only one of the two possible
output files got rotated during a particular call (which would, in fact,
typically be the case during a size-based rotation). This would amount to
about MAXPGPATH (1KB) per rotation, and it's been there since the CSV
code was put in, so it's surprising that nobody noticed it before.
Per bug #5196 from Thomas Poindessous.

Tags:
----
REL8_3_STABLE

Modified Files:
--------------
pgsql/src/backend/postmaster:
syslogger.c (r1.44.2.1 -> r1.44.2.2)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/syslogger.c?r1=1.44.2.1&r2=1.44.2.2)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2009-11-19 22:05:48 pgsql: Typo: dump -> restore fixed in 8.4 and 8.5 Author: Guillaume
Previous Message Tom Lane 2009-11-19 02:45:40 pgsql: Fix memory leak in syslogger: logfile_rotate() would leak a copy