summaryrefslogtreecommitdiff
path: root/src/bin/pg_rewind/copy_fetch.c
diff options
context:
space:
mode:
authorFujii Masao <fujii@postgresql.org>2015-06-11 22:31:18 +0900
committerFujii Masao <fujii@postgresql.org>2015-06-11 22:31:18 +0900
commit966c37fdb5ed9b87f3e91eace4dbbed7909f6769 (patch)
tree65304d1c1ddc9b0aaeebf933e168221d2a1d77ae /src/bin/pg_rewind/copy_fetch.c
parentaacb8b9277ec63ee848442ccc1aa4b3f6eab1893 (diff)
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.
Diffstat (limited to 'src/bin/pg_rewind/copy_fetch.c')
-rw-r--r--src/bin/pg_rewind/copy_fetch.c4
1 files changed, 2 insertions, 2 deletions
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);
}