getwd(3): don't malloc space for buf if it is NULL
authormillert <millert@openbsd.org>
Thu, 16 Dec 2021 19:12:43 +0000 (19:12 +0000)
committermillert <millert@openbsd.org>
Thu, 16 Dec 2021 19:12:43 +0000 (19:12 +0000)
commit7b407ed550ed1d8f12d5067ceb03d87e25c42113
tree442f88c4d26446c034c337aa225a00bf63331026
parentc1c8152c1b9db5e087cadb95dde9e810fe7dc2d7
getwd(3): don't malloc space for buf if it is NULL
The 4.3BSD getwd(3) did not malloc space, use __getcwd(2) directly
so the compat function doesn't either.  OK deraadt@
lib/libc/compat-43/getwd.c