Fix memory leaks in pg_combinebackup/reconstruct.c.

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

Commit: e2072b47b9abc7d298d242217919d3d0d9415fca
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2025-10-22T17:38:37Z
Releases: 18.1
Fix memory leaks in pg_combinebackup/reconstruct.c.

One code path forgot to free the separately-malloc'd filename
part of a struct rfile.  Another place freed the filename but
forgot the struct rfile itself.  These seem worth fixing because
with a large backup we could be dealing with many files.

Coverity found the bug in make_rfile().  I found the other one
by manual inspection.

Files

PathChange+/−
src/bin/pg_combinebackup/reconstruct.c modified +2 −0