mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-16 08:44:38 +08:00
android/hal-sco: Fix memory leak
Release resampler on exit.
This commit is contained in:
parent
cc3dd149f8
commit
3c5413c3dd
@ -617,6 +617,9 @@ static int sco_open_output_stream(struct audio_hw_device *dev,
|
||||
|
||||
return 0;
|
||||
failed:
|
||||
if (out->resampler)
|
||||
release_resampler(out->resampler);
|
||||
|
||||
free(out->downmix_buf);
|
||||
free(out);
|
||||
stream_out = NULL;
|
||||
@ -638,6 +641,9 @@ static void sco_close_output_stream(struct audio_hw_device *dev,
|
||||
sco_dev->out->fd = -1;
|
||||
}
|
||||
|
||||
if (out->resampler)
|
||||
release_resampler(out->resampler);
|
||||
|
||||
free(out->downmix_buf);
|
||||
free(out);
|
||||
sco_dev->out = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user