Fix crash on shutdown

Sometimes we insert NULL into the client object map to mark the object
freed. Now that the map also returns those NULL's, don't try to free
them.
Small cleanups
Make some port methods private.
This commit is contained in:
Wim Taymans 2017-09-11 09:48:13 +02:00
parent f03d229467
commit c72d797dde
7 changed files with 40 additions and 34 deletions

View file

@ -58,7 +58,7 @@ parse_line(struct pw_daemon_config *config,
free(local_err);
ret = false;
} else {
spa_list_insert(config->commands.prev, &command->link);
spa_list_append(&config->commands, &command->link);
}
return ret;
@ -194,9 +194,8 @@ bool pw_daemon_config_run_commands(struct pw_daemon_config *config, struct pw_co
}
}
spa_list_for_each_safe(command, tmp, &config->commands, link) {
spa_list_for_each_safe(command, tmp, &config->commands, link)
pw_command_free(command);
}
return ret;
}