]> git.karo-electronics.de Git - linux-beck.git/commit
dibusb: fix possible memory leak in dibusb_rc_query()
authorWei Yongjun <weiyongjun1@huawei.com>
Sun, 30 Oct 2016 01:36:24 +0000 (23:36 -0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Jan 2017 10:39:20 +0000 (11:39 +0100)
commitfb0a00fb0843136baee7812b7319c2b4db2592aa
tree80da1576f168268258c86a18dc0258e60f05e06c
parent5f6136debf7eefa8e585c2fa52b72403f324fe77
dibusb: fix possible memory leak in dibusb_rc_query()

commit 1f5ecaf985c46889278f51fcb7bc143f60f4eb14 upstream.

'buf' is malloced in dibusb_rc_query() and should be freed before
leaving from the error handling cases, otherwise it will cause
memory leak.

Fixes: ff1c123545d7 ("[media] dibusb: handle error code on RC query")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/usb/dvb-usb/dibusb-common.c