[ovs-dev] [PATCH 2/3] ovsdb: Fix memory leak in replication logic

Andy Zhou azhou at ovn.org
Tue Jul 26 20:08:06 UTC 2016


Release the memory of reply message of the initial "monitor" request.

Reported-at: http://openvswitch.org/pipermail/dev/2016-July/076075.html
Signed-off-by: Andy Zhou <azhou at ovn.org>
---
 ovsdb/replication.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ovsdb/replication.c b/ovsdb/replication.c
index 3d589ef..af7ae5c 100644
--- a/ovsdb/replication.c
+++ b/ovsdb/replication.c
@@ -365,6 +365,10 @@ get_initial_db_state(const struct db *database)
     if (msg->type == JSONRPC_REPLY) {
         process_notification(msg->result, database->db);
     }
+
+    if (msg) {
+        jsonrpc_msg_destroy(msg);
+    }
 }
 
 static void
-- 
1.9.1




More information about the dev mailing list