summaryrefslogtreecommitdiff
path: root/ovsdb
diff options
context:
space:
mode:
authorWilliam Tu <u9012063@gmail.com>2016-07-26 18:28:30 -0700
committerAndy Zhou <azhou@ovn.org>2016-08-02 00:37:55 -0700
commit3479426117ee59088a106b7763bae5ae2afa9bed (patch)
treedb6c7b47be340b605d2ac6a2606322dcb178bf06 /ovsdb
parentc9c5c9e201f1633d51c232a1a7c88da8859f5969 (diff)
downloadopenvswitch-3479426117ee59088a106b7763bae5ae2afa9bed.tar.gz
ovsdb: Fix memory leak in execute_update.
Valgrind testcase 1804 ovsdb-server.at:1023 insert rows, update rows by value reports the following leak. json_from_string (json.c:1025) execute_update (replication.c:614), similarily at execute_delete() process_table_update (replication.c:502) process_notification.part.5 (replication.c:445) process_notification (replication.c:402) check_for_notifications (replication.c:418) replication_run (replication.c:110) Signed-off-by: William Tu <u9012063@gmail.com> Acked-by: Andy Zhou <azhou@ovn.org> Signed-off-by: Andy Zhou <azhou@ovn.org>
Diffstat (limited to 'ovsdb')
-rw-r--r--ovsdb/replication.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ovsdb/replication.c b/ovsdb/replication.c
index f11af702a..099c52da8 100644
--- a/ovsdb/replication.c
+++ b/ovsdb/replication.c
@@ -581,6 +581,8 @@ execute_delete(struct ovsdb_txn *txn, const char *uuid,
}
ovsdb_condition_destroy(&condition);
+ json_destroy(CONST_CAST(struct json *, where));
+
return error;
}
@@ -638,6 +640,7 @@ execute_update(struct ovsdb_txn *txn, const char *uuid,
ovsdb_row_destroy(row);
ovsdb_column_set_destroy(&columns);
ovsdb_condition_destroy(&condition);
+ json_destroy(CONST_CAST(struct json *, where));
return error;
}