diff options
author | Ben Pfaff <blp@ovn.org> | 2017-03-19 10:22:05 -0700 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2017-03-29 11:19:27 -0700 |
commit | 474339e2af2e59ee013ec1daca48279c54ce1764 (patch) | |
tree | 9740a0f9ef3da736cc43940aa10b1fc1d6418fcb /ovsdb | |
parent | 1dd485ee5cf7e0209ca0ec38ab1fb7c8dd2ab172 (diff) | |
download | openvswitch-474339e2af2e59ee013ec1daca48279c54ce1764.tar.gz |
ovsdb-server: Fix memory leak in update_remote_status() error path.
Found by inspection.
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Andy Zhou <azhou@ovn.org>
Diffstat (limited to 'ovsdb')
-rw-r--r-- | ovsdb/ovsdb-server.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ovsdb/ovsdb-server.c b/ovsdb/ovsdb-server.c index 52af4d36a..4f88500a0 100644 --- a/ovsdb/ovsdb-server.c +++ b/ovsdb/ovsdb-server.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2009, 2010, 2011, 2012, 2013, 2014, 2016 Nicira, Inc. +/* Copyright (c) 2009, 2010, 2011, 2012, 2013, 2014, 2016, 2017 Nicira, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -1076,8 +1076,9 @@ update_remote_status(const struct ovsdb_jsonrpc_server *jsonrpc, db = node->data; error = ovsdb_txn_commit(db->txn, false); if (error) { - VLOG_ERR_RL(&rl, "Failed to update remote status: %s", - ovsdb_error_to_string(error)); + char *msg = ovsdb_error_to_string(error); + VLOG_ERR_RL(&rl, "Failed to update remote status: %s", msg); + free(msg); ovsdb_error_destroy(error); } } |