diff mbox

[ovs-dev] test-ovsdb: Fix memory leak reported by valgrind.

Message ID 1455056113-54949-1-git-send-email-u9012063@gmail.com
State Accepted
Headers show

Commit Message

William Tu Feb. 9, 2016, 10:15 p.m. UTC
Testcase 1314: UUID-distinct queries on scalars.
Call stacks:
    allocate_row (row.c:37)
    ovsdb_row_clone (row.c:67)
    do_query_distinct (test-ovsdb.c:1232)
    ovs_cmdl_run_command (command-line.c:121)
    main (test-ovsdb.c:72)

Signed-off-by: William Tu <u9012063@gmail.com>
---
 tests/test-ovsdb.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Ben Pfaff Feb. 10, 2016, 7:19 p.m. UTC | #1
On Tue, Feb 09, 2016 at 02:15:13PM -0800, William Tu wrote:
> Testcase 1314: UUID-distinct queries on scalars.
> Call stacks:
>     allocate_row (row.c:37)
>     ovsdb_row_clone (row.c:67)
>     do_query_distinct (test-ovsdb.c:1232)
>     ovs_cmdl_run_command (command-line.c:121)
>     main (test-ovsdb.c:72)
> 
> Signed-off-by: William Tu <u9012063@gmail.com>

Applied, thanks!
diff mbox

Patch

diff --git a/tests/test-ovsdb.c b/tests/test-ovsdb.c
index 1fbe378..670a141 100644
--- a/tests/test-ovsdb.c
+++ b/tests/test-ovsdb.c
@@ -1296,6 +1296,10 @@  do_query_distinct(struct ovs_cmdl_context *ctx)
     }
     json_destroy(json);
 
+    for (i = 0; i < n_classes; i++) {
+        ovsdb_row_destroy(classes[i].example);
+    }
+
     ovsdb_table_destroy(table); /* Also destroys 'ts'. */
 
     free(rows);