Commit f3cf9d6f authored by Stéphane Letz's avatar Stéphane Letz
Browse files

Merge pull request #162 from Jajcus/release-alsa-card-on-init-error

Release audio devices when alsa_driver_new fails
parents dab7e50e 57e16b9a
......@@ -346,7 +346,7 @@ int JackAlsaDriver::Open(jack_nframes_t nframes,
fPlaybackChannels = ((alsa_driver_t *)fDriver)->playback_nchannels;
return 0;
} else {
JackAudioDriver::Close();
Close();
return -1;
}
}
......@@ -356,7 +356,9 @@ int JackAlsaDriver::Close()
// Generic audio driver close
int res = JackAudioDriver::Close();
if (fDriver) {
alsa_driver_delete((alsa_driver_t*)fDriver);
}
if (JackServerGlobals::on_device_release != NULL)
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment