PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
- by the Free Software Foundation; either version 2 of the License,
+ by the Free Software Foundation; either version 2.1 of the License,
or (at your option) any later version.
PulseAudio is distributed in the hope that it will be useful, but
}
- if (*name == '@' || !name || !pa_namereg_is_valid_name(name))
+ if (!name)
+ return NULL;
+
+ if ((type == PA_NAMEREG_SINK || type == PA_NAMEREG_SOURCE || type == PA_NAMEREG_CARD) &&
+ !pa_namereg_is_valid_name(name))
return NULL;
if ((e = pa_hashmap_get(c->namereg, name)))