mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2025-04-22 07:30:50 +00:00
alloc path bit table on stack
This commit is contained in:
parent
74c1699867
commit
3795c7dee9
1 changed files with 3 additions and 9 deletions
|
@ -1853,12 +1853,9 @@ fluid_list_check_linked_mod(char *list_name, fluid_mod_t *list_mod,
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* path allocation */
|
||||
path = FLUID_MALLOC (sizeof(*path) * count);
|
||||
if(path == NULL)
|
||||
{
|
||||
return FLUID_FAILED;
|
||||
}
|
||||
/* path allocation (on stack) */
|
||||
path = alloca(sizeof(*path) * count);
|
||||
|
||||
/* initialize path:
|
||||
- reset bits FLUID_PATH_VALID, FLUID_PATH_CURRENT
|
||||
- set bits FLUID_MOD_VALID
|
||||
|
@ -1931,9 +1928,6 @@ fluid_list_check_linked_mod(char *list_name, fluid_mod_t *list_mod,
|
|||
}
|
||||
}
|
||||
|
||||
/* free path */
|
||||
FLUID_FREE(path);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue