Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 624fd17

Browse filesBrowse files
devnexentargos
authored andcommitted
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>
1 parent c9a96ae commit 624fd17
Copy full SHA for 624fd17

File tree

Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed
Open diff view settings
Collapse file

‎src/node_contextify.cc‎

Copy file name to clipboardExpand all lines: src/node_contextify.cc
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,11 +260,14 @@ void ContextifyContext::MakeContext(const FunctionCallbackInfo<Value>& args) {
260260
if (try_catch.HasCaught()) {
261261
if (!try_catch.HasTerminated())
262262
try_catch.ReThrow();
263+
delete context;
263264
return;
264265
}
265266

266-
if (context->context().IsEmpty())
267+
if (context->context().IsEmpty()) {
268+
delete context;
267269
return;
270+
}
268271

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

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.