Skip to content

Commit

Permalink
src: fix leak in ObjectWrap instance set/getters
Browse files Browse the repository at this point in the history
Fixes: nodejs/node-addon-api#891

PR-URL: nodejs/node-addon-api#899
Fixes: nodejs/node-addon-api#891
Reviewed-By: Gabriel Schulhof <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
  • Loading branch information
Marlyfleitas committed Feb 12, 2021
1 parent 1176396 commit a3f8aaa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion napi-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -3262,7 +3262,7 @@ inline void InstanceWrap<T>::AttachPropData(napi_env env,
napi_value value,
const napi_property_descriptor* prop) {
napi_status status;
if (prop->method != nullptr && !(prop->attributes & napi_static)) {
if (!(prop->attributes & napi_static)) {
if (prop->method == T::InstanceVoidMethodCallbackWrapper) {
status = Napi::details::AttachData(env,
value,
Expand Down

0 comments on commit a3f8aaa

Please sign in to comment.