Fix a couple of memory leaks in src/bin/pg_basebackup/

Michael Paquier <michael@paquier.xyz>

Commit: 2c7395aad7e849235faac4ead5f69700cfd3c21b
Author: Michael Paquier <michael@paquier.xyz>
Date: 2021-07-26T02:14:11Z
Releases: 13.4
Fix a couple of memory leaks in src/bin/pg_basebackup/

These have been introduced by 7fbe0c8, and could happen for
pg_basebackup and pg_receivewal.

Per report from Coverity for the ones in walmethods.c, I have spotted
the ones in receivelog.c after more review.

Backpatch-through: 10

Files