Skip to content

Commit 980cb60

Browse files
authored
Fix use after delete in deleteStackValue (#13)
1 parent c961df0 commit 980cb60

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/NodeApiJsiRuntime.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2178,6 +2178,7 @@ void NodeApiJsiRuntime::NodeApiRefCountedPointerValue::deleteStackValue(
21782178
CHECK_ELSE_CRASH(value_, "value_ must not be null");
21792179
if (canBeDeletedFromStack_) {
21802180
delete this;
2181+
return;
21812182
}
21822183

21832184
if (usedByJsiPointer() && ref_ == nullptr) {

0 commit comments

Comments
 (0)