aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/dsound.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/backends/dsound.cpp')
-rw-r--r--Alc/backends/dsound.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/Alc/backends/dsound.cpp b/Alc/backends/dsound.cpp
index b642dfea..6a8b0754 100644
--- a/Alc/backends/dsound.cpp
+++ b/Alc/backends/dsound.cpp
@@ -398,9 +398,7 @@ ALCenum ALCdsoundPlayback_open(ALCdsoundPlayback *self, const ALCchar *deviceNam
return ALC_INVALID_VALUE;
}
- al_free(device->DeviceName);
- device->DeviceName = alstrdup(deviceName);
-
+ device->DeviceName = deviceName;
return ALC_NO_ERROR;
}
@@ -864,9 +862,7 @@ ALCenum ALCdsoundCapture_open(ALCdsoundCapture *self, const ALCchar *deviceName)
self->BufferBytes = DSCBDescription.dwBufferBytes;
SetDefaultWFXChannelOrder(device);
- al_free(device->DeviceName);
- device->DeviceName = alstrdup(deviceName);
-
+ device->DeviceName = deviceName;
return ALC_NO_ERROR;
}