aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/oss.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/backends/oss.cpp')
-rw-r--r--Alc/backends/oss.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/Alc/backends/oss.cpp b/Alc/backends/oss.cpp
index 38d1c40d..32ee1022 100644
--- a/Alc/backends/oss.cpp
+++ b/Alc/backends/oss.cpp
@@ -380,9 +380,7 @@ ALCenum ALCplaybackOSS_open(ALCplaybackOSS *self, const ALCchar *name)
return ALC_INVALID_VALUE;
}
- al_free(device->DeviceName);
- device->DeviceName = alstrdup(name);
-
+ device->DeviceName = name;
return ALC_NO_ERROR;
}
@@ -712,9 +710,7 @@ ALCenum ALCcaptureOSS_open(ALCcaptureOSS *self, const ALCchar *name)
return ALC_OUT_OF_MEMORY;
}
- al_free(device->DeviceName);
- device->DeviceName = alstrdup(name);
-
+ device->DeviceName = name;
return ALC_NO_ERROR;
}