routing_target_t *t = mrp_list_entry(p, typeof(*t), hook);
if (is_sink_available(ctx, t->name)) {
- name = t->name;
+ name = mrp_strdup(t->name);
break;
}
}
if (!sink) {
mrp_log_error("gam_connect: error finding default sink, using global default");
- sink = ctx->default_sink;
+ sink = mrp_strdup(ctx->default_sink);
}
rset_id = mrp_get_resource_set_id(rset);
mrp_debug("gam_connect: register rset %u with GAM! (%s(%u) -> %s(%u))",
rset_id, source, source_id, sink, sink_id);
+ mrp_free(sink);
+
/*
calling GAM:
domain: "audio-manager", function: "connect", source_id, sink_id