mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-20 02:30:23 +02:00
fix a couple of leaks
* libguile/bytevectors.h: * libguile/bytevectors.c (scm_c_take_gc_bytevector): Rename this internal function, from scm_c_take_bytevector. This indicates that unlike the other scm_take_* functions, this one takes GC-managed memory. * libguile/objcodes.c (scm_objcode_to_bytecode): * libguile/vm.c (really_make_boot_program): Use scm_gc_malloc_pointerless, not scm_malloc. Thanks to Stefan Israelsson Tampe! * libguile/r6rs-ports.c: * libguile/strings.c: Adapt to renames.
This commit is contained in:
parent
5261e74281
commit
fb031aba42
6 changed files with 15 additions and 14 deletions
|
@ -315,10 +315,10 @@ SCM_DEFINE (scm_objcode_to_bytecode, "objcode->bytecode", 1, 0, 0,
|
|||
|
||||
len = sizeof (struct scm_objcode) + SCM_OBJCODE_TOTAL_LEN (objcode);
|
||||
|
||||
s8vector = scm_malloc (len);
|
||||
s8vector = scm_gc_malloc_pointerless (len, FUNC_NAME);
|
||||
memcpy (s8vector, SCM_OBJCODE_DATA (objcode), len);
|
||||
|
||||
return scm_c_take_bytevector (s8vector, len);
|
||||
return scm_c_take_gc_bytevector (s8vector, len);
|
||||
}
|
||||
#undef FUNC_NAME
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue