diff options
Diffstat (limited to 'src/bin/pg_basebackup/walmethods.c')
-rw-r--r-- | src/bin/pg_basebackup/walmethods.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/bin/pg_basebackup/walmethods.c b/src/bin/pg_basebackup/walmethods.c index 632e095c4e8..1ecc23c2560 100644 --- a/src/bin/pg_basebackup/walmethods.c +++ b/src/bin/pg_basebackup/walmethods.c @@ -299,6 +299,13 @@ CreateWalDirectoryMethod(const char *basedir, bool sync) return method; } +void +FreeWalDirectoryMethod(void) +{ + pg_free(dir_data->basedir); + pg_free(dir_data); +} + /*------------------------------------------------------------------------- * WalTarMethod - write wal to a tar file containing pg_xlog contents @@ -894,3 +901,14 @@ CreateWalTarMethod(const char *tarbase, int compression, bool sync) return method; } + +void +FreeWalTarMethod(void) +{ + pg_free(tar_data->tarfilename); +#ifdef HAVE_LIBZ + if (tar_data->compression) + pg_free(tar_data->zlibOut); +#endif + pg_free(tar_data); +} |