ludic.save, ludic.telemetry: a parsed tree they refuse is freed (23.2)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-27 22:51:06 +03:00
parent f1153f59a2
commit e227b75472
2 changed files with 9 additions and 3 deletions

View file

@ -92,6 +92,10 @@ function telemetry__read_obj(path: string) -> Val {
let s = Fs.read_text(path)
if s == null { return null }
let v = Json.parse(s)
if v == null or Value.kind(v) != 6 { return null }
if v == null { return null }
if Value.kind(v) != 6 {
Json.free(v)
return null
}
return v
}