test-ovsdb: Fix memory leak reported by valgrind.
authorWilliam Tu <u9012063@gmail.com>
Fri, 22 Jan 2016 21:04:50 +0000 (13:04 -0800)
committerBen Pfaff <blp@ovn.org>
Sat, 6 Feb 2016 00:08:06 +0000 (16:08 -0800)
Testcase 1311, 1312: Boolean-distinct queries on scalars, reports leak
below:
    xmalloc (util.c:112)
    do_query_distinct (test-ovsdb.c:1208)
    ovs_cmdl_run_command (command-line.c:121)
    main (test-ovsdb.c:72)

Signed-off-by: William Tu <u9012063@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
tests/test-ovsdb.c

index 15f41b0..1fbe378 100644 (file)
@@ -1298,6 +1298,8 @@ do_query_distinct(struct ovs_cmdl_context *ctx)
 
     ovsdb_table_destroy(table); /* Also destroys 'ts'. */
 
+    free(rows);
+    free(classes);
     exit(exit_code);
 }