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

Tom Lane <tgl@sss.pgh.pa.us>

Commit: b1d55dca917c8595eb89bae5a93c5f81c8b10f81
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2009-11-19T02:45:33Z
Releases: 9.0.0
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.

Files

PathChange+/−
src/backend/postmaster/syslogger.c modified +33 −17