staging: bcm2835-audio: fix memory leak in bcm2835_audio_open_connection()
authorAishwarya Pant <aishpant@gmail.com>
Sun, 12 Mar 2017 15:40:07 +0000 (21:10 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Mar 2017 23:57:53 +0000 (07:57 +0800)
commit0adbfd4694c2b2ae2f48b04295eadafed70612ad
treef1092231083658a1bfc48dce617fe1d1aefab753
parente3173e5783ffdf3aa7bcc8ac0a150b17d83c1792
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>
drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c