Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoralnyan <qShadowp@gmail.com>2017-12-17 13:22:46 +0300
committerMyles Borins <mylesborins@google.com>2018-05-02 00:16:27 +0300
commita744535f99efebd407b63f1681e8331261f30634 (patch)
tree0cafa4f48fc854f1867bec66ec37e747831d3086 /src
parent2e100c82be12d94b80c1574fc4e5bed7dfab6ffe (diff)
n-api: fix memory leak in napi_async_destroy()
Backport-PR-URL: https://github.com/nodejs/node/pull/19265 PR-URL: https://github.com/nodejs/node/pull/17714 Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/node_api.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/node_api.cc b/src/node_api.cc
index f16ceefd5eb..ac0b0959b59 100644
--- a/src/node_api.cc
+++ b/src/node_api.cc
@@ -2770,6 +2770,8 @@ napi_status napi_async_destroy(napi_env env,
reinterpret_cast<node::async_context*>(async_context);
node::EmitAsyncDestroy(isolate, *node_async_context);
+ delete node_async_context;
+
return napi_clear_last_error(env);
}