aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/pulseaudio.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/backends/pulseaudio.c')
-rw-r--r--Alc/backends/pulseaudio.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/Alc/backends/pulseaudio.c b/Alc/backends/pulseaudio.c
index d2d5c9aa..bb371453 100644
--- a/Alc/backends/pulseaudio.c
+++ b/Alc/backends/pulseaudio.c
@@ -695,8 +695,7 @@ static void ALCpulsePlayback_sinkNameCallback(pa_context *UNUSED(context), const
return;
}
- free(device->DeviceName);
- device->DeviceName = strdup(info->description);
+ al_string_copy_cstr(&device->DeviceName, info->description);
}
@@ -1281,8 +1280,7 @@ static void ALCpulseCapture_sourceNameCallback(pa_context *UNUSED(context), cons
return;
}
- free(device->DeviceName);
- device->DeviceName = strdup(info->description);
+ al_string_copy_cstr(&device->DeviceName, info->description);
}