l2cap: fix access to freed memory
commit2c145d7a73206afc576fea86514e892e11481dab
authorzhanghailiang <zhang.zhanghailiang@huawei.com>
Thu, 14 Aug 2014 07:29:12 +0000 (14 15:29 +0800)
committerMichael Tokarev <mjt@tls.msk.ru>
Fri, 15 Aug 2014 15:12:48 +0000 (15 19:12 +0400)
treeb82cd36c6b9a4af4493406e94a7385f9119af878
parent8945c7f75419a8191f3e99b341f1a485b48af766
l2cap: fix access to freed memory

Pointer 'ch' will be used in function 'l2cap_channel_open_req_msg' after
it was previously freed in 'l2cap_channel_open'.
Assigned it to NULL after it is freed.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/bt/l2cap.c