diff --git a/repmgr.c b/repmgr.c index d1ff8f1b..48d7ed27 100644 --- a/repmgr.c +++ b/repmgr.c @@ -539,7 +539,10 @@ do_standby_clone(void) const char *last_wal_segment = NULL; if (dest_dir == NULL) + { + dest_dir = malloc(5); strcpy(dest_dir, "."); + } /* Check this directory could be used as a PGDATA dir */ switch (check_dir(dest_dir))