mirror of
https://github.com/postgres/postgres.git
synced 2025-05-06 19:59:18 +03:00
Fix a probably-harmless read of uninitialized memory in mkdir_p(), to
silence a valgrind warning.
This commit is contained in:
parent
25b8b69eec
commit
08b0e60563
@ -43,7 +43,7 @@
|
|||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
* Portions taken from FreeBSD.
|
* Portions taken from FreeBSD.
|
||||||
*
|
*
|
||||||
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.20 2004/01/31 21:18:00 neilc Exp $
|
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.21 2004/01/31 22:10:00 neilc Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -553,7 +553,7 @@ mkdir_p(char *path, mode_t omode)
|
|||||||
else if (p[0] != '/')
|
else if (p[0] != '/')
|
||||||
continue;
|
continue;
|
||||||
*p = '\0';
|
*p = '\0';
|
||||||
if (p[1] == '\0')
|
if (!last && p[1] == '\0')
|
||||||
last = 1;
|
last = 1;
|
||||||
if (first)
|
if (first)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user