Skip to content

Commit 6fdc48a

Browse files
committed
fixup: missing refcount adjustment
1 parent c8bd2ca commit 6fdc48a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

quickjs.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40509,8 +40509,10 @@ static JSValue js_iterator_helper_next(JSContext *ctx, JSValue this_val,
4050940509
while (it->limit > 0) {
4051040510
it->limit--;
4051140511
item = JS_IteratorNext(ctx, it->obj, method, 0, NULL, pdone);
40512-
if (JS_IsException(item))
40512+
if (JS_IsException(item)) {
40513+
JS_FreeValue(ctx, method);
4051340514
goto fail;
40515+
}
4051440516
JS_FreeValue(ctx, item);
4051540517
if (magic == GEN_MAGIC_RETURN)
4051640518
*pdone = TRUE;

0 commit comments

Comments
 (0)