diff options
author | Joe Stringer <joe@ovn.org> | 2016-09-09 13:48:52 -0700 |
---|---|---|
committer | Joe Stringer <joe@ovn.org> | 2016-09-12 11:05:01 -0700 |
commit | ad376c93032c5960392efc3192e2a0852bd16462 (patch) | |
tree | 21a70c96e3870004412ae4f21b3bb663770cd6f5 | |
parent | 0720377c902ea210619794004aa455ca0d1332fb (diff) | |
download | openvswitch-ad376c93032c5960392efc3192e2a0852bd16462.tar.gz |
ovsdb-monitor: Fix valgrind 'possible loss' warnings.
By placing these nodes at the start of their respective structures,
several "possibly lost" warnings from valgrind are silenced.
Fixes: 60e0cd041958 ("ovsdb: Replication usability improvements")
Signed-off-by: Joe Stringer <joe@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
-rw-r--r-- | ovsdb/jsonrpc-server.c | 2 | ||||
-rw-r--r-- | ovsdb/monitor.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/ovsdb/jsonrpc-server.c b/ovsdb/jsonrpc-server.c index 427026d66..87fc240b7 100644 --- a/ovsdb/jsonrpc-server.c +++ b/ovsdb/jsonrpc-server.c @@ -1102,9 +1102,9 @@ ovsdb_jsonrpc_trigger_complete_done(struct ovsdb_jsonrpc_session *s) /* Jsonrpc front end monitor. */ struct ovsdb_jsonrpc_monitor { + struct hmap_node node; /* In ovsdb_jsonrpc_session's "monitors". */ struct ovsdb_jsonrpc_session *session; struct ovsdb *db; - struct hmap_node node; /* In ovsdb_jsonrpc_session's "monitors". */ struct json *monitor_id; struct ovsdb_monitor *dbmon; uint64_t unflushed; /* The first transaction that has not been diff --git a/ovsdb/monitor.c b/ovsdb/monitor.c index 9a6fbf5a5..5e3c84747 100644 --- a/ovsdb/monitor.c +++ b/ovsdb/monitor.c @@ -86,8 +86,8 @@ struct ovsdb_monitor_json_cache_node { }; struct jsonrpc_monitor_node { - struct ovsdb_jsonrpc_monitor *jsonrpc_monitor; struct ovs_list node; + struct ovsdb_jsonrpc_monitor *jsonrpc_monitor; }; /* A particular column being monitored. */ @@ -116,12 +116,12 @@ struct ovsdb_monitor_row { * 'transaction' stores the first update's transaction id. * */ struct ovsdb_monitor_changes { + struct hmap_node hmap_node; /* Element in ovsdb_monitor_tables' changes + hmap. */ struct ovsdb_monitor_table *mt; struct hmap rows; int n_refs; uint64_t transaction; - struct hmap_node hmap_node; /* Element in ovsdb_monitor_tables' changes - hmap. */ }; /* A particular table being monitored. */ |