summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Dawson <michael_dawson@ca.ibm.com>2017-04-03 12:34:34 -0400
committerMichael Dawson <michael_dawson@ca.ibm.com>2017-04-05 12:52:53 -0400
commit491d59da8446801ec2fcc6ecd5dee669137f5436 (patch)
treebaf8160c9125bcdb294e97911e48083ce25306e2 /src
parent4a21e398d69ff139764c184f44fed327fdf7be72 (diff)
downloadandroid-node-v8-491d59da8446801ec2fcc6ecd5dee669137f5436.tar.gz
android-node-v8-491d59da8446801ec2fcc6ecd5dee669137f5436.tar.bz2
android-node-v8-491d59da8446801ec2fcc6ecd5dee669137f5436.zip
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: https://github.com/nodejs/node/pull/12192 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Hitesh Kanwathirtha <hiteshk@microsoft.com>
Diffstat (limited to 'src')
-rw-r--r--src/node_api.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/node_api.cc b/src/node_api.cc
index b61964cf96..035929e212 100644
--- a/src/node_api.cc
+++ b/src/node_api.cc
@@ -2290,6 +2290,10 @@ napi_status napi_create_external_buffer(napi_env env,
*result = v8impl::JsValueFromV8LocalValue(maybe.ToLocalChecked());
return GET_RETURN_STATUS();
+ // 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,