Skip to content
Permalink
Browse files

src: fix small memory leak

PR-URL: #28452
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information...
devnexen authored and targos committed Jun 27, 2019
1 parent c9a96ae commit 624fd17064f30e1bf410e394ab1a7c9c54763798
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/node_contextify.cc
@@ -260,11 +260,14 @@ void ContextifyContext::MakeContext(const FunctionCallbackInfo<Value>& args) {
if (try_catch.HasCaught()) {
if (!try_catch.HasTerminated())
try_catch.ReThrow();
delete context;
return;
}

if (context->context().IsEmpty())
if (context->context().IsEmpty()) {
delete context;
return;
}

sandbox->SetPrivate(
env->context(),

0 comments on commit 624fd17

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