diff options
author | Michael Dawson <mdawson@devrus.com> | 2022-03-10 17:50:04 +0300 |
---|---|---|
committer | Michael Dawson <mdawson@devrus.com> | 2022-03-23 00:40:28 +0300 |
commit | d10c71798da6718346b49e87d5ce8313e81d98f2 (patch) | |
tree | cfcec64bf89caa75dda4e262d80724c14b05c0cd /src/api | |
parent | 0f79a274621c3fab0d0665fb3715a7b1354896aa (diff) |
src: suppress false coverity warning
Signed-off-by: Michael Dawson <mdawson@devrus.com>
PR-URL: https://github.com/nodejs/node/pull/42284
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/api')
-rw-r--r-- | src/api/environment.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/api/environment.cc b/src/api/environment.cc index e3e90dbad98..97261256858 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; } |