2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

ovsdb-idl: Fix memory leak

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 <yihung.wei@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
Yi-Hung Wei
2017-04-07 14:43:42 -07:00
committed by Ben Pfaff
parent c71caf1b28
commit d927cd6e73

View File

@@ -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);