fix allocation bug in ffi

svn: r18530
This commit is contained in:
Matthew Flatt 2010-03-13 16:03:27 +00:00
parent 036781d453
commit e713e27eee
2 changed files with 2 additions and 2 deletions

View File

@ -2448,7 +2448,7 @@ Scheme_Object *ffi_do_call(void *data, int argc, Scheme_Object *argv[])
} else {
ivals = malloc(nargs * sizeof(ForeignAny));
avalues = scheme_malloc(nargs * sizeof(void*));
offsets = scheme_malloc(nargs * sizeof(long));
offsets = scheme_malloc_atomic(nargs * sizeof(long));
}
/* iterate on input values and types */
for (i=0; i<nargs; i++, itypes=SCHEME_CDR(itypes)) {

View File

@ -1818,7 +1818,7 @@ Scheme_Object *ffi_do_call(void *data, int argc, Scheme_Object *argv[])
} else {
ivals = malloc(nargs * sizeof(ForeignAny));
avalues = scheme_malloc(nargs * sizeof(void*));
offsets = scheme_malloc(nargs * sizeof(long));
offsets = scheme_malloc_atomic(nargs * sizeof(long));
}
/* iterate on input values and types */
for (i=0; i<nargs; i++, itypes=SCHEME_CDR(itypes)) {