[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/4] l2cap: fix access freed memory
From: |
Alex Bennée |
Subject: |
Re: [Qemu-devel] [PATCH 1/4] l2cap: fix access freed memory |
Date: |
Mon, 04 Aug 2014 09:37:39 +0100 |
zhanghailiang writes:
> 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.
>
> Signed-off-by: zhanghailiang <address@hidden>
> ---
> hw/bt/l2cap.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/bt/l2cap.c b/hw/bt/l2cap.c
> index 2301d6f..591e047 100644
> --- a/hw/bt/l2cap.c
> +++ b/hw/bt/l2cap.c
> @@ -429,7 +429,7 @@ static struct l2cap_chan_s *l2cap_channel_open(struct
> l2cap_instance_s *l2cap,
> status = L2CAP_CS_NO_INFO;
> } else {
> g_free(ch);
> -
> + ch = NULL;
> result = L2CAP_CR_NO_MEM;
> status = L2CAP_CS_NO_INFO;
> }
Reviewed-by: Alex Bennée <address@hidden>
--
Alex Bennée
[Qemu-devel] [PATCH 2/4] monitor: fix access freed memory, zhanghailiang, 2014/08/04
[Qemu-devel] [PATCH 3/4] virtio-blk: fix reference a pointer which might be freed, zhanghailiang, 2014/08/04