From 0396a6052903b8ceec71c3159fa1a84eb6d3aa96 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jo=C3=A3o=20Paulo=20Rechi=20Vita?= Date: Wed, 13 Aug 2008 14:52:26 -0300 Subject: [PATCH] Copy arguments values instead of just getting a pointer for them --- src/modules/module-bt-device.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/module-bt-device.c b/src/modules/module-bt-device.c index da2fa337..ab50f24c 100644 --- a/src/modules/module-bt-device.c +++ b/src/modules/module-bt-device.c @@ -728,15 +728,15 @@ int pa__init(pa_module* m) { pa_log_error("failed to parse module arguments"); 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"); 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"); 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"); goto fail; } -- 2.11.4.GIT