From 966c37fdb5ed9b87f3e91eace4dbbed7909f6769 Mon Sep 17 00:00:00 2001 From: Fujii Masao Date: Thu, 11 Jun 2015 22:31:18 +0900 Subject: Fix some issues in pg_rewind. * Remove invalid option character "N" from the third argument (valid option string) of getopt_long(). * Use pg_free() or pfree() to free the memory allocated by pg_malloc() or palloc() instead of always using free(). * Assume problem is no disk space if write() fails but doesn't set errno. * Fix several typos. Patch by me. Review by Michael Paquier. --- src/bin/pg_rewind/copy_fetch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/bin/pg_rewind/copy_fetch.c') diff --git a/src/bin/pg_rewind/copy_fetch.c b/src/bin/pg_rewind/copy_fetch.c index 1ca00d12adf..991e3486706 100644 --- a/src/bin/pg_rewind/copy_fetch.c +++ b/src/bin/pg_rewind/copy_fetch.c @@ -43,7 +43,7 @@ traverse_datadir(const char *datadir, process_file_callback_t callback) /* * recursive part of traverse_datadir * - * parent_path is the current subdirectory's path relative to datadir, + * parentpath is the current subdirectory's path relative to datadir, * or NULL at the top level. */ static void @@ -262,5 +262,5 @@ execute_pagemap(datapagemap_t *pagemap, const char *path) copy_file_range(path, offset, offset + BLCKSZ, false); /* Ok, this block has now been copied from new data dir to old */ } - free(iter); + pg_free(iter); } -- cgit v1.2.3