diff --git a/src/api/environment.cc b/src/api/environment.cc index 55b895c235f51e..cc3edb87feb6ba 100644 --- a/src/api/environment.cc +++ b/src/api/environment.cc @@ -141,8 +141,12 @@ void* DebuggingArrayBufferAllocator::Reallocate(void* data, Mutex::ScopedLock lock(mutex_); void* ret = NodeArrayBufferAllocator::Reallocate(data, old_size, size); if (ret == nullptr) { - if (size == 0) // i.e. equivalent to free(). + if (size == 0) { // i.e. equivalent to free(). + // suppress coverity warning as data is used as key versus as pointer + // in UnregisterPointerInternal + // coverity[pass_freed_arg] UnregisterPointerInternal(data, old_size); + } return nullptr; }