mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-12-11 05:11:33 +00:00
Fix two more segfaults in error paths
Patch credit: surabhi-mishra
This commit is contained in:
parent
2f6aa0e9e6
commit
b65ae14ccf
2 changed files with 2 additions and 2 deletions
|
@ -315,7 +315,7 @@ fluid_midi_router_add_rule (fluid_midi_router_t *router, fluid_midi_router_rule_
|
||||||
|
|
||||||
fluid_return_val_if_fail (router != NULL, FLUID_FAILED);
|
fluid_return_val_if_fail (router != NULL, FLUID_FAILED);
|
||||||
fluid_return_val_if_fail (rule != NULL, FLUID_FAILED);
|
fluid_return_val_if_fail (rule != NULL, FLUID_FAILED);
|
||||||
fluid_return_val_if_fail (type >= 0 && type <= FLUID_MIDI_ROUTER_RULE_COUNT, FLUID_FAILED);
|
fluid_return_val_if_fail (type >= 0 && type < FLUID_MIDI_ROUTER_RULE_COUNT, FLUID_FAILED);
|
||||||
|
|
||||||
|
|
||||||
fluid_mutex_lock (router->rules_mutex); /* ++ lock */
|
fluid_mutex_lock (router->rules_mutex); /* ++ lock */
|
||||||
|
|
|
@ -1487,10 +1487,10 @@ fluid_settings_option_concat (fluid_settings_t *settings, const char *name,
|
||||||
newlist = fluid_list_sort (newlist, fluid_list_str_compare_func);
|
newlist = fluid_list_sort (newlist, fluid_list_str_compare_func);
|
||||||
|
|
||||||
str = FLUID_MALLOC (len);
|
str = FLUID_MALLOC (len);
|
||||||
str[0] = 0;
|
|
||||||
|
|
||||||
if (str)
|
if (str)
|
||||||
{
|
{
|
||||||
|
str[0] = 0;
|
||||||
for (p = newlist; p; p = p->next)
|
for (p = newlist; p; p = p->next)
|
||||||
{
|
{
|
||||||
option = fluid_list_get (p);
|
option = fluid_list_get (p);
|
||||||
|
|
Loading…
Reference in a new issue