Re: [ovs-dev] [PATCH 05/10] trigger: Free leaked ovsdb_schema

2019-09-17 Thread William Tu
On Wed, Sep 11, 2019 at 02:18:31PM -0700, Yifeng Sun wrote: > Valgrind reported: > > 1925: schema conversion online - standalone > > ==10884== 689 (56 direct, 633 indirect) bytes in 1 blocks are definitely lost > in loss record 384 of 420 > ==10884==at 0x4C2FB55: calloc (in >

Re: [ovs-dev] [PATCH 05/10] trigger: Free leaked ovsdb_schema

2019-09-13 Thread aginwala
Thanks Yifeng: Sure I revisited the trigger flow and even if its disconnected with trigger_success(), ovsdb_jsonrpc_trigger_complete will indeed take care of destroying t->reply via jsonrpc_msg_destroy() which I missed. So you are right, we don't need to json_destroy(result) explicitly here. I

Re: [ovs-dev] [PATCH 05/10] trigger: Free leaked ovsdb_schema

2019-09-13 Thread Yifeng Sun
Thanks Aginwala, Could you please double check if 'json_destroy(result)' is necessary here? If result != NULL, then it is passed in trigger_success(), which puts result in 't->reply', later, jsonrpc_msg_destroy() will free it. Thanks, Yifeng On Thu, Sep 12, 2019 at 2:00 PM aginwala wrote: > >

Re: [ovs-dev] [PATCH 05/10] trigger: Free leaked ovsdb_schema

2019-09-12 Thread aginwala
One minor suggestion here: Can you also handle freeing result: diff --git a/ovsdb/trigger.c b/ovsdb/trigger.c index 6f4ed96b0..0158957d6 100644 --- a/ovsdb/trigger.c +++ b/ovsdb/trigger.c @@ -214,6 +214,7 @@ ovsdb_trigger_try(struct ovsdb_trigger *t, long long int now) /*

[ovs-dev] [PATCH 05/10] trigger: Free leaked ovsdb_schema

2019-09-11 Thread Yifeng Sun
Valgrind reported: 1925: schema conversion online - standalone ==10884== 689 (56 direct, 633 indirect) bytes in 1 blocks are definitely lost in loss record 384 of 420 ==10884==at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==10884==by 0x44A592: xcalloc