* [Qemu-devel] [PATCH] net/colo-compare: Fix memory free error
@ 2017-02-21 2:44 Zhang Chen
2017-02-22 1:47 ` Hailiang Zhang
0 siblings, 1 reply; 5+ messages in thread
From: Zhang Chen @ 2017-02-21 2:44 UTC (permalink / raw)
To: qemu devel; +Cc: Jason Wang, Zhang Chen
We use g_queue_init() to init s->conn_list, so we should use g_queue_clear()
to instead of g_queue_free().
Signed-off-by: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>
---
net/colo-compare.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/colo-compare.c b/net/colo-compare.c
index 162fd6a..cf8c4c9 100644
--- a/net/colo-compare.c
+++ b/net/colo-compare.c
@@ -715,7 +715,7 @@ static void colo_compare_finalize(Object *obj)
qemu_chr_fe_deinit(&s->chr_sec_in);
qemu_chr_fe_deinit(&s->chr_out);
- g_queue_free(&s->conn_list);
+ g_queue_clear(&s->conn_list);
if (qemu_thread_is_self(&s->thread)) {
/* compare connection */
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] net/colo-compare: Fix memory free error
2017-02-21 2:44 [Qemu-devel] [PATCH] net/colo-compare: Fix memory free error Zhang Chen
@ 2017-02-22 1:47 ` Hailiang Zhang
2017-02-22 3:09 ` Jason Wang
0 siblings, 1 reply; 5+ messages in thread
From: Hailiang Zhang @ 2017-02-22 1:47 UTC (permalink / raw)
To: Zhang Chen, qemu devel; +Cc: xuquan8, Jason Wang
On 2017/2/21 10:44, Zhang Chen wrote:
> We use g_queue_init() to init s->conn_list, so we should use g_queue_clear()
> to instead of g_queue_free().
>
> Signed-off-by: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>
Reviewed-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
> ---
> net/colo-compare.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/colo-compare.c b/net/colo-compare.c
> index 162fd6a..cf8c4c9 100644
> --- a/net/colo-compare.c
> +++ b/net/colo-compare.c
> @@ -715,7 +715,7 @@ static void colo_compare_finalize(Object *obj)
> qemu_chr_fe_deinit(&s->chr_sec_in);
> qemu_chr_fe_deinit(&s->chr_out);
>
> - g_queue_free(&s->conn_list);
> + g_queue_clear(&s->conn_list);
>
> if (qemu_thread_is_self(&s->thread)) {
> /* compare connection */
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] net/colo-compare: Fix memory free error
2017-02-22 1:47 ` Hailiang Zhang
@ 2017-02-22 3:09 ` Jason Wang
2017-02-22 3:15 ` Jason Wang
0 siblings, 1 reply; 5+ messages in thread
From: Jason Wang @ 2017-02-22 3:09 UTC (permalink / raw)
To: Hailiang Zhang, Zhang Chen, qemu devel; +Cc: xuquan8
On 2017年02月22日 09:47, Hailiang Zhang wrote:
> On 2017/2/21 10:44, Zhang Chen wrote:
>> We use g_queue_init() to init s->conn_list, so we should use
>> g_queue_clear()
>> to instead of g_queue_free().
>>
>> Signed-off-by: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>
>
> Reviewed-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
>
Applied, thanks.
>> ---
>> net/colo-compare.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/net/colo-compare.c b/net/colo-compare.c
>> index 162fd6a..cf8c4c9 100644
>> --- a/net/colo-compare.c
>> +++ b/net/colo-compare.c
>> @@ -715,7 +715,7 @@ static void colo_compare_finalize(Object *obj)
>> qemu_chr_fe_deinit(&s->chr_sec_in);
>> qemu_chr_fe_deinit(&s->chr_out);
>>
>> - g_queue_free(&s->conn_list);
>> + g_queue_clear(&s->conn_list);
>>
>> if (qemu_thread_is_self(&s->thread)) {
>> /* compare connection */
>>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] net/colo-compare: Fix memory free error
2017-02-22 3:09 ` Jason Wang
@ 2017-02-22 3:15 ` Jason Wang
2017-02-22 5:06 ` Zhang Chen
0 siblings, 1 reply; 5+ messages in thread
From: Jason Wang @ 2017-02-22 3:15 UTC (permalink / raw)
To: Hailiang Zhang, Zhang Chen, qemu devel; +Cc: xuquan8
On 2017年02月22日 11:09, Jason Wang wrote:
>
>
> On 2017年02月22日 09:47, Hailiang Zhang wrote:
>> On 2017/2/21 10:44, Zhang Chen wrote:
>>> We use g_queue_init() to init s->conn_list, so we should use
>>> g_queue_clear()
>>> to instead of g_queue_free().
>>>
>>> Signed-off-by: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>
>>
>> Reviewed-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
>>
>
> Applied, thanks.
Actually reverted. The patch does not apply cleanly on -net.
Please re-send the patch on top of https://github.com/jasowang/qemu.git net
Thanks
>
>>> ---
>>> net/colo-compare.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/net/colo-compare.c b/net/colo-compare.c
>>> index 162fd6a..cf8c4c9 100644
>>> --- a/net/colo-compare.c
>>> +++ b/net/colo-compare.c
>>> @@ -715,7 +715,7 @@ static void colo_compare_finalize(Object *obj)
>>> qemu_chr_fe_deinit(&s->chr_sec_in);
>>> qemu_chr_fe_deinit(&s->chr_out);
>>>
>>> - g_queue_free(&s->conn_list);
>>> + g_queue_clear(&s->conn_list);
>>>
>>> if (qemu_thread_is_self(&s->thread)) {
>>> /* compare connection */
>>>
>>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] net/colo-compare: Fix memory free error
2017-02-22 3:15 ` Jason Wang
@ 2017-02-22 5:06 ` Zhang Chen
0 siblings, 0 replies; 5+ messages in thread
From: Zhang Chen @ 2017-02-22 5:06 UTC (permalink / raw)
To: Jason Wang, Hailiang Zhang, qemu devel; +Cc: zhangchen.fnst, xuquan8
On 02/22/2017 11:15 AM, Jason Wang wrote:
>
>
> On 2017年02月22日 11:09, Jason Wang wrote:
>>
>>
>> On 2017年02月22日 09:47, Hailiang Zhang wrote:
>>> On 2017/2/21 10:44, Zhang Chen wrote:
>>>> We use g_queue_init() to init s->conn_list, so we should use
>>>> g_queue_clear()
>>>> to instead of g_queue_free().
>>>>
>>>> Signed-off-by: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>
>>>
>>> Reviewed-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
>>>
>>
>> Applied, thanks.
>
> Actually reverted. The patch does not apply cleanly on -net.
>
> Please re-send the patch on top of
> https://github.com/jasowang/qemu.git net
OK~~
Thanks
Zhang Chen
>
> Thanks
>
>>
>>>> ---
>>>> net/colo-compare.c | 2 +-
>>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/net/colo-compare.c b/net/colo-compare.c
>>>> index 162fd6a..cf8c4c9 100644
>>>> --- a/net/colo-compare.c
>>>> +++ b/net/colo-compare.c
>>>> @@ -715,7 +715,7 @@ static void colo_compare_finalize(Object *obj)
>>>> qemu_chr_fe_deinit(&s->chr_sec_in);
>>>> qemu_chr_fe_deinit(&s->chr_out);
>>>>
>>>> - g_queue_free(&s->conn_list);
>>>> + g_queue_clear(&s->conn_list);
>>>>
>>>> if (qemu_thread_is_self(&s->thread)) {
>>>> /* compare connection */
>>>>
>>>
>>
>>
>
>
>
> .
>
--
Thanks
Zhang Chen
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-02-22 5:07 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-21 2:44 [Qemu-devel] [PATCH] net/colo-compare: Fix memory free error Zhang Chen
2017-02-22 1:47 ` Hailiang Zhang
2017-02-22 3:09 ` Jason Wang
2017-02-22 3:15 ` Jason Wang
2017-02-22 5:06 ` Zhang Chen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.