Re: [ovs-dev] [PATCH ovn 1/3] ovn-northd-ddlog: Fix memory leaks.

2021-03-24 Thread Ben Pfaff
On Wed, Mar 24, 2021 at 11:47:38AM +0530, Numan Siddique wrote:
> On Wed, Mar 10, 2021 at 5:55 AM Ben Pfaff  wrote:
> >
> > ddlog_delta_get_table() returns data that must be freed, but the code
> > in northd_update_probe_interval() did not do that.  This fixes it.
> >
> > In addition, the accumulated deltas weren't freed when the daemon exits.
> > This doesn't really matter but it's cleaner to do so, so this commit
> > also does that.
> >
> > Signed-off-by: Ben Pfaff 
> > Reported-by: Numan Siddique 
> 
> Thanks for these fixes and for the cleanup.
> 
> For all the 3 patches in the series.
> Acked-by: Numan Siddique 

Thanks, I applied them all to master.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH ovn 1/3] ovn-northd-ddlog: Fix memory leaks.

2021-03-24 Thread Numan Siddique
On Wed, Mar 10, 2021 at 5:55 AM Ben Pfaff  wrote:
>
> ddlog_delta_get_table() returns data that must be freed, but the code
> in northd_update_probe_interval() did not do that.  This fixes it.
>
> In addition, the accumulated deltas weren't freed when the daemon exits.
> This doesn't really matter but it's cleaner to do so, so this commit
> also does that.
>
> Signed-off-by: Ben Pfaff 
> Reported-by: Numan Siddique 

Thanks for these fixes and for the cleanup.

For all the 3 patches in the series.
Acked-by: Numan Siddique 

Numan

> ---
>  northd/ovn-northd-ddlog.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/northd/ovn-northd-ddlog.c b/northd/ovn-northd-ddlog.c
> index 238987410239..be3de5cee29e 100644
> --- a/northd/ovn-northd-ddlog.c
> +++ b/northd/ovn-northd-ddlog.c
> @@ -577,6 +577,7 @@ northd_update_probe_interval(struct northd_ctx *nb, 
> struct northd_ctx *sb)
>  table_id tid = ddlog_get_table_id("Northd_Probe_Interval");
>  ddlog_delta *probe_delta = ddlog_delta_get_table(delta, tid);
>  ddlog_delta_enumerate(probe_delta, northd_update_probe_interval_cb, 
> (uintptr_t) _interval);
> +ddlog_free_delta(probe_delta);
>
>  ovsdb_cs_set_probe_interval(nb->cs, probe_interval);
>  ovsdb_cs_set_probe_interval(sb->cs, probe_interval);
> @@ -1230,6 +1231,7 @@ main(int argc, char *argv[])
>  northd_ctx_destroy(nb_ctx);
>  northd_ctx_destroy(sb_ctx);
>
> +ddlog_free_delta(delta);
>  ddlog_stop(ddlog);
>
>  if (replay_fd >= 0) {
> --
> 2.29.2
>
> ___
> dev mailing list
> d...@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH ovn 1/3] ovn-northd-ddlog: Fix memory leaks.

2021-03-09 Thread Ben Pfaff
ddlog_delta_get_table() returns data that must be freed, but the code
in northd_update_probe_interval() did not do that.  This fixes it.

In addition, the accumulated deltas weren't freed when the daemon exits.
This doesn't really matter but it's cleaner to do so, so this commit
also does that.

Signed-off-by: Ben Pfaff 
Reported-by: Numan Siddique 
---
 northd/ovn-northd-ddlog.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/northd/ovn-northd-ddlog.c b/northd/ovn-northd-ddlog.c
index 238987410239..be3de5cee29e 100644
--- a/northd/ovn-northd-ddlog.c
+++ b/northd/ovn-northd-ddlog.c
@@ -577,6 +577,7 @@ northd_update_probe_interval(struct northd_ctx *nb, struct 
northd_ctx *sb)
 table_id tid = ddlog_get_table_id("Northd_Probe_Interval");
 ddlog_delta *probe_delta = ddlog_delta_get_table(delta, tid);
 ddlog_delta_enumerate(probe_delta, northd_update_probe_interval_cb, 
(uintptr_t) _interval);
+ddlog_free_delta(probe_delta);
 
 ovsdb_cs_set_probe_interval(nb->cs, probe_interval);
 ovsdb_cs_set_probe_interval(sb->cs, probe_interval);
@@ -1230,6 +1231,7 @@ main(int argc, char *argv[])
 northd_ctx_destroy(nb_ctx);
 northd_ctx_destroy(sb_ctx);
 
+ddlog_free_delta(delta);
 ddlog_stop(ddlog);
 
 if (replay_fd >= 0) {
-- 
2.29.2

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev