mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-15 02:54:40 +00:00
staging: bcm2835-audio: fix memory leak in bcm2835_audio_open_connection()
In bcm2835_audio_open_connection(), if VCHI connection fails or initialisation of VCHI audio instance fails vchi_instance needs to be deallocated otherwise it will cause a memory leak. Signed-off-by: Aishwarya Pant <aishpant@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
e3173e5783
commit
0adbfd4694
1 changed files with 1 additions and 0 deletions
|
@ -446,6 +446,7 @@ static int bcm2835_audio_open_connection(struct bcm2835_alsa_stream *alsa_stream
|
||||||
LOG_DBG(" success !\n");
|
LOG_DBG(" success !\n");
|
||||||
ret = 0;
|
ret = 0;
|
||||||
err_free_mem:
|
err_free_mem:
|
||||||
|
kfree(vchi_instance);
|
||||||
LOG_DBG(" .. OUT\n");
|
LOG_DBG(" .. OUT\n");
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Add table
Reference in a new issue