Fix double free

This commit is contained in:
2026-01-29 00:05:02 -08:00
parent 5029405a70
commit a469e137b4
2 changed files with 3 additions and 2 deletions

View File

@ -1,4 +1,4 @@
;; -*- mode: lisp-data -*-
(print (funcall (let ((te 'a))
(lambda (b &optional (a te)) a)) 2))
(lambda (b &optional (a te ap)) a)) 2 3))

View File

@ -193,6 +193,7 @@ void compact_stack_frame(struct StackFrame *restrict frame) {
for (size_t i = 1; i < refs->num_blocks; ++i) {
lisp_free(refs->blocks[i]);
}
refs->blocks =
lisp_realloc(refs->blocks, sizeof(struct LocalReferencesBlock *));
refs->num_blocks = 1;
}