index f2b150d15e9c0ae84f746b1b103bd03910274a1f..43fd9359c595b1816c19e40d7b3ea591e1564a29 100644 (file)
* as a service.
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/port/copydir.c,v 1.28 2010年02月15日 11:40:49 stark Exp $
+ * $PostgreSQL: pgsql/src/port/copydir.c,v 1.29 2010年02月22日 00:11:05 stark Exp $
*
*-------------------------------------------------------------------------
*/
@@ -90,10 +90,12 @@ copydir(char *fromdir, char *todir, bool recurse)
else if (S_ISREG(fst.st_mode))
copy_file(fromfile, tofile);
}
+ Free(xldir);
/*
* Be paranoid here and fsync all files to ensure we catch problems.
*/
+ AllocateDir(fromdir);
if (xldir == NULL)
ereport(ERROR,
(errcode_for_file_access(),