]> git.kaiwu.me - quickjs.git/commitdiff
removed memory leak
authorFabrice Bellard <fabrice@bellard.org>
Tue, 13 Oct 2026 12:40:18 +0000 (14:40 +0200)
committerFabrice Bellard <fabrice@bellard.org>
Tue, 13 Oct 2026 12:40:18 +0000 (14:40 +0200)
temporal/temporal.c

index a7c9a28ae3ccdb31fbc757e2341abccd53bb1c4e..9542d1a0660947b781fa1aa77cb61ebda603755e 100644 (file)
@@ -1771,6 +1771,8 @@ int ti_prepare_calendar_fields(JSContext *ctx, JSValueConst obj,
             JS_FreeCString(ctx, era_str);
             out->present_mask |= TI_FIELD_ERA;
         }
+        JS_FreeValue(ctx, v);
+        v = JS_UNDEFINED;
     }
 
     /* eraYear */