X-Git-Url: https://git.exim.org/users/heiko/exim.git/blobdiff_plain/d195b66d38fd2ef7407705eba04bb8b6953cd41d..bb33d92ccb5a2aed3219a99e2fd3f3df48fb00de:/src/src/os.c diff --git a/src/src/os.c b/src/src/os.c index 47af038f7..ca24e8dd2 100644 --- a/src/src/os.c +++ b/src/src/os.c @@ -879,7 +879,7 @@ char * b = (char *)buffer; if (!size) size = PATH_MAX; if (!b && !(b = malloc(size))) return NULL; if (!(b = getcwd(b, size))) return NULL; -return realloc(b, strlen(b) + 1); +return buffer ? buffer : realloc(b, strlen(b) + 1); } #endif