From: Connor MacDonald Date: Thu, 24 May 2018 13:57:30 +0000 (-0300) Subject: Fix ALSA CTL handle not being closed in the default case X-Git-Tag: 5.1.0~42^2~1 X-Git-Url: https://main.carlh.net/gitweb/?a=commitdiff_plain;h=d79e960d709e6f540a724ef3dd33fb91aab1e5e4;p=rtaudio.git Fix ALSA CTL handle not being closed in the default case --- diff --git a/RtAudio.cpp b/RtAudio.cpp index b091e15..8255993 100644 --- a/RtAudio.cpp +++ b/RtAudio.cpp @@ -7157,6 +7157,7 @@ bool RtApiAlsa :: probeDeviceOpen( unsigned int device, StreamMode mode, unsigne if ( result == 0 ) { if ( nDevices == device ) { strcpy( name, "default" ); + snd_ctl_close( chandle ); goto foundDevice; } nDevices++;