Re: [ovs-dev] [PATCH 4/8] ovsdb-idl: Fix memory leak

2017-04-26 Thread Ben Pfaff
On Wed, Apr 26, 2017 at 06:21:34PM +0200, Timothy M. Redaelli wrote:
> On 04/24/2017 06:30 PM, Ben Pfaff wrote:
> > On Fri, Apr 07, 2017 at 02:43:42PM -0700, Yi-Hung Wei wrote:
> >> In testcase "simple idl, conditional, multiple clauses in condition - C",
> >> valgrind reports a memory leak with the following call stack.
> >> xmalloc (util.c:112)
> >> resize (hmap.c:100)
> >> ovsdb_idl_condition_clone (ovsdb-idl.c:1075)
> >> ovsdb_idl_set_condition (ovsdb-idl.c:1095)
> >> update_conditions (test-ovsdb.c:2299)
> >> do_idl (test-ovsdb.c:2388)
> >> ovs_cmdl_run_command__ (command-line.c:115)
> >> main (test-ovsdb.c:73)
> >>
> >> Signed-off-by: Yi-Hung Wei 
> > 
> > Thanks, I applied this to master, branch-2.7, and branch-2.6.
> 
> Hi,
> unlucky this commit breaks build on branch-2.6 since the function
> "ovsdb_idl_condition_destroy" was added in commit
> 0164e367f5d8 ("ovsdb-idl: Change interface to conditional monitoring.")
> and it's not available on branch 2.6.

Oops.  Thanks for the report.  For now, I reverted this from branch-2.6.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH 4/8] ovsdb-idl: Fix memory leak

2017-04-26 Thread Timothy M. Redaelli
On 04/24/2017 06:30 PM, Ben Pfaff wrote:
> On Fri, Apr 07, 2017 at 02:43:42PM -0700, Yi-Hung Wei wrote:
>> In testcase "simple idl, conditional, multiple clauses in condition - C",
>> valgrind reports a memory leak with the following call stack.
>> xmalloc (util.c:112)
>> resize (hmap.c:100)
>> ovsdb_idl_condition_clone (ovsdb-idl.c:1075)
>> ovsdb_idl_set_condition (ovsdb-idl.c:1095)
>> update_conditions (test-ovsdb.c:2299)
>> do_idl (test-ovsdb.c:2388)
>> ovs_cmdl_run_command__ (command-line.c:115)
>> main (test-ovsdb.c:73)
>>
>> Signed-off-by: Yi-Hung Wei 
> 
> Thanks, I applied this to master, branch-2.7, and branch-2.6.

Hi,
unlucky this commit breaks build on branch-2.6 since the function
"ovsdb_idl_condition_destroy" was added in commit
0164e367f5d8 ("ovsdb-idl: Change interface to conditional monitoring.")
and it's not available on branch 2.6.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH 4/8] ovsdb-idl: Fix memory leak

2017-04-24 Thread Ben Pfaff
On Fri, Apr 07, 2017 at 02:43:42PM -0700, Yi-Hung Wei wrote:
> In testcase "simple idl, conditional, multiple clauses in condition - C",
> valgrind reports a memory leak with the following call stack.
> xmalloc (util.c:112)
> resize (hmap.c:100)
> ovsdb_idl_condition_clone (ovsdb-idl.c:1075)
> ovsdb_idl_set_condition (ovsdb-idl.c:1095)
> update_conditions (test-ovsdb.c:2299)
> do_idl (test-ovsdb.c:2388)
> ovs_cmdl_run_command__ (command-line.c:115)
> main (test-ovsdb.c:73)
> 
> Signed-off-by: Yi-Hung Wei 

Thanks, I applied this to master, branch-2.7, and branch-2.6.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH 4/8] ovsdb-idl: Fix memory leak

2017-04-07 Thread Yi-Hung Wei
In testcase "simple idl, conditional, multiple clauses in condition - C",
valgrind reports a memory leak with the following call stack.
xmalloc (util.c:112)
resize (hmap.c:100)
ovsdb_idl_condition_clone (ovsdb-idl.c:1075)
ovsdb_idl_set_condition (ovsdb-idl.c:1095)
update_conditions (test-ovsdb.c:2299)
do_idl (test-ovsdb.c:2388)
ovs_cmdl_run_command__ (command-line.c:115)
main (test-ovsdb.c:73)

Signed-off-by: Yi-Hung Wei 
---
 lib/ovsdb-idl.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c
index 48b3af0d8855..c79951f82281 100644
--- a/lib/ovsdb-idl.c
+++ b/lib/ovsdb-idl.c
@@ -327,6 +327,7 @@ ovsdb_idl_destroy(struct ovsdb_idl *idl)
 
 for (i = 0; i < idl->class->n_tables; i++) {
 struct ovsdb_idl_table *table = &idl->tables[i];
+ovsdb_idl_condition_destroy(&table->condition);
 shash_destroy(&table->columns);
 hmap_destroy(&table->rows);
 free(table->modes);
-- 
2.7.4

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