diff --git a/src/podcast/quicktime/UBAudioQueueRecorder.cpp b/src/podcast/quicktime/UBAudioQueueRecorder.cpp index 388a9a7f..f1cbef14 100644 --- a/src/podcast/quicktime/UBAudioQueueRecorder.cpp +++ b/src/podcast/quicktime/UBAudioQueueRecorder.cpp @@ -162,14 +162,10 @@ QString UBAudioQueueRecorder::deviceNameFromDeviceID(AudioDeviceID id) if (noErr == AudioDeviceGetProperty(id, 0, true, kAudioObjectPropertyName, &size, &name)) { - char *cname = new char[1024]; - - bool result = CFStringGetCString (name, cname, 1024, kCFStringEncodingUTF8); - int length = CFStringGetLength (name); - - deviceName = QString::fromUtf8(cname, length); - - delete cname; + char cname[1024]; + memset(cname,0,1024); + CFStringGetCString (name, cname, 1024, kCFStringEncodingUTF8); + deviceName = QString::fromUtf8(cname); } CFRelease(name);