diff options
author | Neil Conway <neilc@samurai.com> | 2004-01-31 22:10:00 +0000 |
---|---|---|
committer | Neil Conway <neilc@samurai.com> | 2004-01-31 22:10:00 +0000 |
commit | 08b0e605636d52bb8b2168dded694fe86f1acbea (patch) | |
tree | 7da482c3bfdedb66b191b58205d2a564f67fd7d4 | |
parent | 25b8b69eec0cc496e26cba202f9c171d17cd6906 (diff) |
Fix a probably-harmless read of uninitialized memory in mkdir_p(), to
silence a valgrind warning.
-rw-r--r-- | src/bin/initdb/initdb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c index 401427a0ba5..81607877da0 100644 --- a/src/bin/initdb/initdb.c +++ b/src/bin/initdb/initdb.c @@ -43,7 +43,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * 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] != '/') continue; *p = '\0'; - if (p[1] == '\0') + if (!last && p[1] == '\0') last = 1; if (first) { |