Another segmentation fault caused by an uninitialized string

This commit is contained in:
Jaime Casanova
2010-10-22 18:38:35 -05:00
parent d0650fe199
commit 45fdbbb426

View File

@@ -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))