[PATCH] net/filter-rewriter: destroy g_hash_table in colo_rewriter_cleanup

Pan Nengyuan posted 1 patch 3 years, 8 months ago
Test docker-quick@centos7 failed
Test docker-mingw@fedora failed
Test checkpatch failed
Test FreeBSD failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200904134908.1396-1-pannengyuan@huawei.com
Maintainers: Jason Wang <jasowang@redhat.com>, Li Zhijian <lizhijian@cn.fujitsu.com>, Zhang Chen <chen.zhang@intel.com>
net/filter-rewriter.c | 2 ++
1 file changed, 2 insertions(+)
[PATCH] net/filter-rewriter: destroy g_hash_table in colo_rewriter_cleanup
Posted by Pan Nengyuan 3 years, 8 months ago
s->connection_track_table forgot to destroy in colo_rewriter_cleanup. Fix it.

Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Pan Nengyuan <pannengyuan@huawei.com>
---
 net/filter-rewriter.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/filter-rewriter.c b/net/filter-rewriter.c
index 1aaad101b6..9ff366d44f 100644
--- a/net/filter-rewriter.c
+++ b/net/filter-rewriter.c
@@ -376,6 +376,8 @@ static void colo_rewriter_cleanup(NetFilterState *nf)
         filter_rewriter_flush(nf);
         g_free(s->incoming_queue);
     }
+
+    g_hash_table_destroy(s->connection_track_table);
 }
 
 static void colo_rewriter_setup(NetFilterState *nf, Error **errp)
-- 
2.18.2


RE: [PATCH] net/filter-rewriter: destroy g_hash_table in colo_rewriter_cleanup
Posted by Zhang, Chen 3 years, 8 months ago

> -----Original Message-----
> From: Pan Nengyuan <pannengyuan@huawei.com>
> Sent: Friday, September 4, 2020 9:49 PM
> To: qemu-devel@nongnu.org
> Cc: Zhang, Chen <chen.zhang@intel.com>; jasowang@redhat.com;
> zhang.zhanghailiang@huawei.com; kuhn.chenqun@huawei.com; Pan
> Nengyuan <pannengyuan@huawei.com>
> Subject: [PATCH] net/filter-rewriter: destroy g_hash_table in
> colo_rewriter_cleanup
> 
> s->connection_track_table forgot to destroy in colo_rewriter_cleanup. Fix it.
> 
> Reported-by: Euler Robot <euler.robot@huawei.com>
> Signed-off-by: Pan Nengyuan <pannengyuan@huawei.com>

Oh, Thanks Euler Robot~~
Reviewed-by: Zhang Chen <chen.zhang@intel.com>

Thanks
Zhang Chen

> ---
>  net/filter-rewriter.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/net/filter-rewriter.c b/net/filter-rewriter.c index
> 1aaad101b6..9ff366d44f 100644
> --- a/net/filter-rewriter.c
> +++ b/net/filter-rewriter.c
> @@ -376,6 +376,8 @@ static void colo_rewriter_cleanup(NetFilterState *nf)
>          filter_rewriter_flush(nf);
>          g_free(s->incoming_queue);
>      }
> +
> +    g_hash_table_destroy(s->connection_track_table);
>  }
> 
>  static void colo_rewriter_setup(NetFilterState *nf, Error **errp)
> --
> 2.18.2


Re: [PATCH] net/filter-rewriter: destroy g_hash_table in colo_rewriter_cleanup
Posted by Li Qiang 3 years, 8 months ago
Pan Nengyuan <pannengyuan@huawei.com> 于2020年9月4日周五 下午3:23写道:
>
> s->connection_track_table forgot to destroy in colo_rewriter_cleanup. Fix it.
>
> Reported-by: Euler Robot <euler.robot@huawei.com>
> Signed-off-by: Pan Nengyuan <pannengyuan@huawei.com>

Reviewed-by: Li Qiang <liq3ea@gmail.com>

> ---
>  net/filter-rewriter.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/net/filter-rewriter.c b/net/filter-rewriter.c
> index 1aaad101b6..9ff366d44f 100644
> --- a/net/filter-rewriter.c
> +++ b/net/filter-rewriter.c
> @@ -376,6 +376,8 @@ static void colo_rewriter_cleanup(NetFilterState *nf)
>          filter_rewriter_flush(nf);
>          g_free(s->incoming_queue);
>      }
> +
> +    g_hash_table_destroy(s->connection_track_table);
>  }
>
>  static void colo_rewriter_setup(NetFilterState *nf, Error **errp)
> --
> 2.18.2
>
>

Re: [PATCH] net/filter-rewriter: destroy g_hash_table in colo_rewriter_cleanup
Posted by Pan Nengyuan 3 years, 7 months ago
ping!

Maybe missed to queue?

On 2020/9/5 8:44, Li Qiang wrote:
> Pan Nengyuan <pannengyuan@huawei.com> 于2020年9月4日周五 下午3:23写道:
>>
>> s->connection_track_table forgot to destroy in colo_rewriter_cleanup. Fix it.
>>
>> Reported-by: Euler Robot <euler.robot@huawei.com>
>> Signed-off-by: Pan Nengyuan <pannengyuan@huawei.com>
> 
> Reviewed-by: Li Qiang <liq3ea@gmail.com>
> 
>> ---
>>  net/filter-rewriter.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/net/filter-rewriter.c b/net/filter-rewriter.c
>> index 1aaad101b6..9ff366d44f 100644
>> --- a/net/filter-rewriter.c
>> +++ b/net/filter-rewriter.c
>> @@ -376,6 +376,8 @@ static void colo_rewriter_cleanup(NetFilterState *nf)
>>          filter_rewriter_flush(nf);
>>          g_free(s->incoming_queue);
>>      }
>> +
>> +    g_hash_table_destroy(s->connection_track_table);
>>  }
>>
>>  static void colo_rewriter_setup(NetFilterState *nf, Error **errp)
>> --
>> 2.18.2
>>
>>

RE: [PATCH] net/filter-rewriter: destroy g_hash_table in colo_rewriter_cleanup
Posted by Zhang, Chen 3 years, 7 months ago
I already queued this patch to COLO proxy tree, then I will send a series to Jason.

Thanks
Chen

> -----Original Message-----
> From: Pan Nengyuan <pannengyuan@huawei.com>
> Sent: Saturday, October 10, 2020 6:55 PM
> To: Li Qiang <liq3ea@gmail.com>
> Cc: Qemu Developers <qemu-devel@nongnu.org>; Zhang, Chen
> <chen.zhang@intel.com>; Jason Wang <jasowang@redhat.com>;
> zhanghailiang <zhang.zhanghailiang@huawei.com>; Chen Qun
> <kuhn.chenqun@huawei.com>; qemu-trivial@nongnu.org; Laurent Vivier
> <laurent@vivier.eu>
> Subject: Re: [PATCH] net/filter-rewriter: destroy g_hash_table in
> colo_rewriter_cleanup
> 
> ping!
> 
> Maybe missed to queue?
> 
> On 2020/9/5 8:44, Li Qiang wrote:
> > Pan Nengyuan <pannengyuan@huawei.com> 于2020年9月4日周五 下
> 午3:23写道:
> >>
> >> s->connection_track_table forgot to destroy in colo_rewriter_cleanup. Fix
> it.
> >>
> >> Reported-by: Euler Robot <euler.robot@huawei.com>
> >> Signed-off-by: Pan Nengyuan <pannengyuan@huawei.com>
> >
> > Reviewed-by: Li Qiang <liq3ea@gmail.com>
> >
> >> ---
> >>  net/filter-rewriter.c | 2 ++
> >>  1 file changed, 2 insertions(+)
> >>
> >> diff --git a/net/filter-rewriter.c b/net/filter-rewriter.c index
> >> 1aaad101b6..9ff366d44f 100644
> >> --- a/net/filter-rewriter.c
> >> +++ b/net/filter-rewriter.c
> >> @@ -376,6 +376,8 @@ static void colo_rewriter_cleanup(NetFilterState
> *nf)
> >>          filter_rewriter_flush(nf);
> >>          g_free(s->incoming_queue);
> >>      }
> >> +
> >> +    g_hash_table_destroy(s->connection_track_table);
> >>  }
> >>
> >>  static void colo_rewriter_setup(NetFilterState *nf, Error **errp)
> >> --
> >> 2.18.2
> >>
> >>