Skip to content
Browse files

napi: supress invalid coverity leak message

Coverity was complaining that finalizer was being
leaked in this method, however it should be
freed when the buffer is finalized so I believe
the message is invalid.

Add the required comments to suppress the warning.

PR-URL: #12192
Reviewed-By: James M Snell <>
Reviewed-By: Colin Ihrig <>
Reviewed-By: Ben Noordhuis <>
Reviewed-By: Anna Henningsen <>
Reviewed-By: Hitesh Kanwathirtha <>
  • Loading branch information...
mhdawson committed Apr 3, 2017
1 parent 4a21e39 commit 491d59da8446801ec2fcc6ecd5dee669137f5436
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/
@@ -2290,6 +2290,10 @@ napi_status napi_create_external_buffer(napi_env env,

*result = v8impl::JsValueFromV8LocalValue(maybe.ToLocalChecked());
// Tell coverity that 'finalizer' should not be freed when we return
// as it will be deleted when the buffer to which it is associated
// is finalized.
// coverity[leaked_storage]

napi_status napi_create_buffer_copy(napi_env env,

0 comments on commit 491d59d

Please sign in to comment.
You can’t perform that action at this time.