Fix memory and file descriptor leaks in pg_receivexlog/pg_basebackup

Magnus Hagander <magnus@hagander.net>

Commit: 058a050ec769fb1431220d822f00b0a442293514
Author: Magnus Hagander <magnus@hagander.net>
Date: 2012-07-12T11:33:58Z
Releases: 9.3.0
Fix memory and file descriptor leaks in pg_receivexlog/pg_basebackup

When the internal loop mode was added, freeing memory and closing
filedescriptors before returning became important, and a few cases
in the code missed that.

Fujii Masao

Files

PathChange+/−
src/bin/pg_basebackup/receivelog.c modified +39 −19
src/bin/pg_basebackup/streamutil.c modified +15 −1