Fix two more segfaults in error paths

Patch credit: surabhi-mishra
This commit is contained in:
David Henningsson 2013-08-09 14:48:46 +00:00
parent 2f6aa0e9e6
commit b65ae14ccf
2 changed files with 2 additions and 2 deletions

View file

@ -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 (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 */

View file

@ -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);
str = FLUID_MALLOC (len);
str[0] = 0;
if (str)
{
str[0] = 0;
for (p = newlist; p; p = p->next)
{
option = fluid_list_get (p);