Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
src: suppress false coverity warning
Signed-off-by: Michael Dawson <mdawson@devrus.com>
  • Loading branch information
mhdawson committed Mar 10, 2022
commit c8937f812cc4f87a7d1661dca37e872b750d83c7
6 changes: 5 additions & 1 deletion src/api/environment.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down