I doesn't make sense to require all callers of
pa_device_port_new() to create the hashmap themselves. There
are and there will be no cases where a port without any
profiles would be desired.
p = pa_device_port_new(core, name, description, sizeof(pa_alsa_port_data));
pa_assert(p);
pa_hashmap_put(ports, p->name, p);
- p->profiles = pa_hashmap_new(pa_idxset_string_hash_func, pa_idxset_string_compare_func);
data = PA_DEVICE_PORT_DATA(p);
data->path = path;
p->core = c;
p->priority = 0;
p->available = PA_PORT_AVAILABLE_UNKNOWN;
- p->profiles = NULL;
+ p->profiles = pa_hashmap_new(pa_idxset_string_hash_func, pa_idxset_string_compare_func);
p->is_input = FALSE;
p->is_output = FALSE;
p->proplist = pa_proplist_new();