Re: [Qemu-devel] [PATCH] hw/bt/sdp: Fix resource leak detect by coverity

2015-03-16 Thread Paolo Bonzini
On 16/03/2015 08:29, Markus Armbruster wrote: > > Well, in this case the bug in bt_l2cap_sdp_close_ch is much worse than a > > resource leak. But bluetooth is not the utmost priority in QEMU > > development... > > To put it more bluntly: it's rotting in peace. > > Occasional drive-by fixes won

Re: [Qemu-devel] [PATCH] hw/bt/sdp: Fix resource leak detect by coverity

2015-03-16 Thread Markus Armbruster
Paolo Bonzini writes: > On 15/03/2015 11:23, Michael Tokarev wrote: >> Or, alternatively, to keep this `data' pointer in sdp to use it in >> bt_l2cap_sdp_close_ch(). > > Yes. > >>> > In any case, it seems simpler to just leave this code aside. >> How many times this code is called? >> >> We have

Re: [Qemu-devel] [PATCH] hw/bt/sdp: Fix resource leak detect by coverity

2015-03-15 Thread Paolo Bonzini
On 15/03/2015 11:23, Michael Tokarev wrote: > Or, alternatively, to keep this `data' pointer in sdp to use it in > bt_l2cap_sdp_close_ch(). Yes. >> > In any case, it seems simpler to just leave this code aside. > How many times this code is called? > > We have many many places in qemu where re

Re: [Qemu-devel] [PATCH] hw/bt/sdp: Fix resource leak detect by coverity

2015-03-15 Thread Michael Tokarev
15.03.2015 12:21, Paolo Bonzini wrote: > On 14/03/2015 11:07, Stefan Weil wrote: >> >> This fixes the memory leak, but I still don't understand what is done here. >> data is allocated, then filled with values, now it is also deallocated. >> But I'm missing the part where all those data is used. >

Re: [Qemu-devel] [PATCH] hw/bt/sdp: Fix resource leak detect by coverity

2015-03-15 Thread Paolo Bonzini
On 14/03/2015 11:07, Stefan Weil wrote: > > This fixes the memory leak, but I still don't understand what is done here. > data is allocated, then filled with values, now it is also deallocated. > But I'm missing the part where all those data is used. "data" escapes in record->attribute_list[rec

Re: [Qemu-devel] [PATCH] hw/bt/sdp: Fix resource leak detect by coverity

2015-03-14 Thread Stefan Weil
Am 14.03.2015 um 10:47 schrieb Shannon Zhao: Free data in function sdp_attr_write after use. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- For minimum modification, just add a variable to record the data. --- hw/bt/sdp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 delet

[Qemu-devel] [PATCH] hw/bt/sdp: Fix resource leak detect by coverity

2015-03-14 Thread Shannon Zhao
Free data in function sdp_attr_write after use. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- For minimum modification, just add a variable to record the data. --- hw/bt/sdp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/bt/sdp.c b/hw/bt/sdp.c in

Re: [Qemu-devel] [PATCH] hw/bt/sdp: Fix resource leak detect by coverity

2015-03-14 Thread Shannon Zhao
On 2015/3/14 14:57, Stefan Weil wrote: > Am 14.03.2015 um 04:42 schrieb Shannon Zhao: >> Free data in function sdp_attr_write after use. >> >> Signed-off-by: Shannon Zhao >> Signed-off-by: Shannon Zhao >> --- >> hw/bt/sdp.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/hw/bt/sdp.

Re: [Qemu-devel] [PATCH] hw/bt/sdp: Fix resource leak detect by coverity

2015-03-13 Thread Stefan Weil
Am 14.03.2015 um 04:42 schrieb Shannon Zhao: Free data in function sdp_attr_write after use. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- hw/bt/sdp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/bt/sdp.c b/hw/bt/sdp.c index 218e075..8e6d5e3 100644 --- a/hw/bt/sdp.c

[Qemu-devel] [PATCH] hw/bt/sdp: Fix resource leak detect by coverity

2015-03-13 Thread Shannon Zhao
Free data in function sdp_attr_write after use. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- hw/bt/sdp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/bt/sdp.c b/hw/bt/sdp.c index 218e075..8e6d5e3 100644 --- a/hw/bt/sdp.c +++ b/hw/bt/sdp.c @@ -735,6 +735,7 @@ static void