soundserver: fix double freeing.

This commit is contained in:
Maxim Poliakovski 2023-10-18 16:18:54 +02:00
parent 36cb84eaaa
commit cfb1999caf
2 changed files with 5 additions and 1 deletions

View File

@ -117,6 +117,8 @@ void SoundServer::shutdown()
case SND_STREAM_OPENED:
close_out_stream();
/* fall through */
case SND_STREAM_CLOSED:
/* fall through */
case SND_SERVER_UP:
/* fall through */
case SND_API_READY:
@ -219,5 +221,6 @@ void SoundServer::close_out_stream()
{
cubeb_stream_stop(this->out_stream);
cubeb_stream_destroy(this->out_stream);
this->status = SND_STREAM_CLOSED;
LOG_F(9, "Sound output stream closed.");
}

View File

@ -41,7 +41,8 @@ enum {
SND_SERVER_DOWN = 0,
SND_API_READY,
SND_SERVER_UP,
SND_STREAM_OPENED
SND_STREAM_OPENED,
SND_STREAM_CLOSED
};