diff --git a/env/env_posix.cc b/env/env_posix.cc index a9895ec78..038d7c44a 100644 --- a/env/env_posix.cc +++ b/env/env_posix.cc @@ -479,7 +479,7 @@ class PosixEnv : public Env { if (status.ok()) { status = GetFileSize(fname, &size); } - void* base; + void* base = nullptr; if (status.ok()) { base = mmap(nullptr, static_cast(size), PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);