diff options
author | Andy Zhou <azhou@ovn.org> | 2016-07-25 19:22:03 -0700 |
---|---|---|
committer | Andy Zhou <azhou@ovn.org> | 2016-07-27 13:57:54 -0700 |
commit | cef276aafcc2cff1e70079aa2476e71a72ad79d3 (patch) | |
tree | 03fc955b56637825fd321d09f227699d218895e2 /ovsdb | |
parent | d3c8a7e8e4c203e7203e4e39c7d431f26dae4bf5 (diff) | |
download | openvswitch-cef276aafcc2cff1e70079aa2476e71a72ad79d3.tar.gz |
ovsdb: Properly close replication rpc connection
This patch removes rpc related memory leak reported below.
Reported-at: http://openvswitch.org/pipermail/dev/2016-July/076075.html
Signed-off-by: Andy Zhou <azhou@ovn.org>
Acked-by: William Tu <u9012063@gmail.com>
Diffstat (limited to 'ovsdb')
-rw-r--r-- | ovsdb/ovsdb-server.c | 1 | ||||
-rw-r--r-- | ovsdb/replication.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/ovsdb/ovsdb-server.c b/ovsdb/ovsdb-server.c index 239cca8ec..1c6ddca40 100644 --- a/ovsdb/ovsdb-server.c +++ b/ovsdb/ovsdb-server.c @@ -202,6 +202,7 @@ main_loop(struct ovsdb_jsonrpc_server *jsonrpc, struct shash *all_dbs, } } + disconnect_remote_server(); free(remotes_error); } diff --git a/ovsdb/replication.c b/ovsdb/replication.c index 52b708523..e12591703 100644 --- a/ovsdb/replication.c +++ b/ovsdb/replication.c @@ -391,6 +391,7 @@ check_for_notifications(struct shash *all_dbs) if (error == EAGAIN) { return; } else if (error) { + jsonrpc_close(rpc); rpc = open_jsonrpc(remote_ovsdb_server); if (!rpc) { /* Remote server went down. */ |