aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/alsa.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/backends/alsa.c')
-rw-r--r--Alc/backends/alsa.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Alc/backends/alsa.c b/Alc/backends/alsa.c
index 51965cec..106e788e 100644
--- a/Alc/backends/alsa.c
+++ b/Alc/backends/alsa.c
@@ -647,7 +647,7 @@ static ALCenum ALCplaybackAlsa_open(ALCplaybackAlsa *self, const ALCchar *name)
/* Free alsa's global config tree. Otherwise valgrind reports a ton of leaks. */
snd_config_update_free_global();
- device->DeviceName = strdup(name);
+ al_string_copy_cstr(&device->DeviceName, name);
return ALC_NO_ERROR;
}
@@ -1052,7 +1052,7 @@ static ALCenum ALCcaptureAlsa_open(ALCcaptureAlsa *self, const ALCchar *name)
}
}
- device->DeviceName = strdup(name);
+ al_string_copy_cstr(&device->DeviceName, name);
return ALC_NO_ERROR;