From 6bb14e45cee9d8d7da37675cc6933146f7a95155 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 27 Aug 2009 02:53:09 -0700 Subject: Store a copy of the device name in the device --- Alc/portaudio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Alc/portaudio.c') diff --git a/Alc/portaudio.c b/Alc/portaudio.c index 6d1b6837..c50214a2 100644 --- a/Alc/portaudio.c +++ b/Alc/portaudio.c @@ -89,8 +89,6 @@ static ALCboolean pa_open_playback(ALCdevice *device, const ALCchar *deviceName) return ALC_FALSE; } - device->szDeviceName = pa_device; - data = (pa_data*)calloc(1, sizeof(pa_data)); device->ExtraData = data; @@ -143,6 +141,7 @@ static ALCboolean pa_open_playback(ALCdevice *device, const ALCchar *deviceName) return ALC_FALSE; } + device->szDeviceName = strdup(pa_device); device->UpdateSize = device->BufferSize/periods; return ALC_TRUE; } -- cgit v1.2.3