mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-06 13:29:59 -05:00
control: remap - assign right name to the child handle for no-op
Fixes: https://github.com/alsa-project/alsa-utils/issues/100 Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
1a1f0fb244
commit
e47c11822d
1 changed files with 4 additions and 0 deletions
|
|
@ -1173,6 +1173,10 @@ int snd_ctl_remap_open(snd_ctl_t **handlep, const char *name, snd_config_t *rema
|
||||||
/* no-op check, remove the plugin */
|
/* no-op check, remove the plugin */
|
||||||
if (priv->map_items == 0 && priv->remap_items == 0) {
|
if (priv->map_items == 0 && priv->remap_items == 0) {
|
||||||
remap_free(priv);
|
remap_free(priv);
|
||||||
|
free(child->name);
|
||||||
|
child->name = name ? strdup(name) : NULL;
|
||||||
|
if (name && !child->name)
|
||||||
|
return -ENOMEM;
|
||||||
*handlep = child;
|
*handlep = child;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue