mirror of
https://github.com/janet-lang/janet
synced 2025-01-12 16:40:27 +00:00
Fix memory leak caused by casting error.
janet_abstract_end improperly modified a gc tag.
This commit is contained in:
parent
a861399ecb
commit
1588359ebc
@ -35,7 +35,7 @@ void *janet_abstract_begin(const JanetAbstractType *atype, size_t size) {
|
||||
}
|
||||
|
||||
void *janet_abstract_end(void *x) {
|
||||
janet_gc_settype((void *)(janet_gc_header(x)), JANET_MEMORY_ABSTRACT);
|
||||
janet_gc_settype((void *)(janet_abstract_head(x)), JANET_MEMORY_ABSTRACT);
|
||||
return x;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user