Skip to content

Commit

Permalink
fixup: missing refcount adjustment
Browse files Browse the repository at this point in the history
  • Loading branch information
saghul committed Nov 11, 2024
1 parent c8bd2ca commit 6fdc48a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion quickjs.c
Original file line number Diff line number Diff line change
Expand Up @@ -40509,8 +40509,10 @@ static JSValue js_iterator_helper_next(JSContext *ctx, JSValue this_val,
while (it->limit > 0) {
it->limit--;
item = JS_IteratorNext(ctx, it->obj, method, 0, NULL, pdone);
if (JS_IsException(item))
if (JS_IsException(item)) {
JS_FreeValue(ctx, method);
goto fail;
}
JS_FreeValue(ctx, item);
if (magic == GEN_MAGIC_RETURN)
*pdone = TRUE;
Expand Down

0 comments on commit 6fdc48a

Please sign in to comment.