aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/sndio.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-11-18 18:45:45 -0800
committerChris Robinson <[email protected]>2018-11-18 18:45:45 -0800
commitbafcba7194c36eaf4fa1cb09b000170f8a138055 (patch)
tree5d81112305a2f920017bcf95a4a8221734eb2122 /Alc/backends/sndio.cpp
parentb10e7d08c34bc6d46aaf61ef2a0183e7841b75f3 (diff)
Use a std::string for the device name
Diffstat (limited to 'Alc/backends/sndio.cpp')
-rw-r--r--Alc/backends/sndio.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/Alc/backends/sndio.cpp b/Alc/backends/sndio.cpp
index be6cd2e3..958bc2ff 100644
--- a/Alc/backends/sndio.cpp
+++ b/Alc/backends/sndio.cpp
@@ -148,9 +148,7 @@ static ALCenum SndioPlayback_open(SndioPlayback *self, const ALCchar *name)
return ALC_INVALID_VALUE;
}
- al_free(device->DeviceName);
- device->DeviceName = alstrdup(name);
-
+ device->DeviceName = name;
return ALC_NO_ERROR;
}
@@ -489,9 +487,7 @@ static ALCenum SndioCapture_open(SndioCapture *self, const ALCchar *name)
SetDefaultChannelOrder(device);
- al_free(device->DeviceName);
- device->DeviceName = alstrdup(name);
-
+ device->DeviceName = name;
return ALC_NO_ERROR;
}