@@ -879,6 +879,19 @@ add_monitored_table(int argc, char *argv[],
}
static void
+destroy_monitored_table(struct monitored_table *mts, size_t n)
+{
+ int i;
+
+ for (i = 0; i < n; i++) {
+ struct monitored_table *mt = &mts[i];
+ ovsdb_column_set_destroy(&mt->columns);
+ }
+
+ free(mts);
+}
+
+static void
do_monitor__(struct jsonrpc *rpc, const char *database,
enum ovsdb_monitor_version version,
int argc, char *argv[])
@@ -1024,6 +1037,8 @@ do_monitor__(struct jsonrpc *rpc, const char *database,
unixctl_server_wait(unixctl);
poll_block();
}
+
+ destroy_monitored_table(mts, n_mts);
}
static void
Properly free memory used monitored_tables to reduce valgrind noises. Reported-by: William Tu <u9012063@gmail.com> Reported-at: http://openvswitch.org/pipermail/dev/2016-January/064161.html Signed-off-by: Andy Zhou <azhou@ovn.org> --- ovsdb/ovsdb-client.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)