mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
Copy arguments values instead of just getting a pointer for them
This commit is contained in:
parent
f992296b97
commit
0396a60529
1 changed files with 3 additions and 3 deletions
|
|
@ -728,15 +728,15 @@ int pa__init(pa_module* m) {
|
||||||
pa_log_error("failed to parse module arguments");
|
pa_log_error("failed to parse module arguments");
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
if (!(u->name = pa_modargs_get_value(ma, "name", DEFAULT_SINK_NAME))) {
|
if (!(u->name = pa_xstrdup(pa_modargs_get_value(ma, "name", DEFAULT_SINK_NAME)))) {
|
||||||
pa_log_error("failed to get device address from module arguments");
|
pa_log_error("failed to get device address from module arguments");
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
if (!(u->addr = pa_modargs_get_value(ma, "addr", NULL))) {
|
if (!(u->addr = pa_xstrdup(pa_modargs_get_value(ma, "addr", NULL)))) {
|
||||||
pa_log_error("failed to get device address from module arguments");
|
pa_log_error("failed to get device address from module arguments");
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
if (!(u->profile = pa_modargs_get_value(ma, "profile", NULL))) {
|
if (!(u->profile = pa_xstrdup(pa_modargs_get_value(ma, "profile", NULL)))) {
|
||||||
pa_log_error("failed to get profile from module arguments");
|
pa_log_error("failed to get profile from module arguments");
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue