module: don't free properties twice on error

This commit is contained in:
Wim Taymans 2019-06-25 17:40:03 +02:00
parent 49c4355507
commit 76956eb41c
2 changed files with 4 additions and 2 deletions

View file

@ -40,7 +40,8 @@ static void *do_loop(void *user_data)
while (this->running) {
if ((res = pw_loop_iterate(this->loop, -1)) < 0)
pw_log_warn("data-loop %p: iterate error %d", this, res);
pw_log_warn("data-loop %p: iterate error %d (%s)",
this, res, spa_strerror(res));
}
pw_log_debug("data-loop %p: leave thread", this);
pw_loop_leave(this->loop);

View file

@ -234,10 +234,11 @@ pw_module_load(struct pw_core *core,
this = &impl->this;
this->core = core;
this->properties = properties;
properties = NULL;
spa_hook_list_init(&this->listener_list);
pw_properties_set(properties, PW_KEY_MODULE_NAME, name);
pw_properties_set(this->properties, PW_KEY_MODULE_NAME, name);
this->info.name = name ? strdup(name) : NULL;
this->info.filename = filename;