summaryrefslogtreecommitdiff
path: root/ovsdb
diff options
context:
space:
mode:
authorIlya Maximets <i.maximets@ovn.org>2020-10-23 20:20:04 +0200
committerIlya Maximets <i.maximets@ovn.org>2020-10-27 13:34:08 +0100
commit91bdb33e041ef3e91b19a2a2e1562b95685c37d1 (patch)
treecfe6474729192b8efebe792849ce6055bcfe5d95 /ovsdb
parent50f603dc4bf09125e924d850a11078068b7d68b0 (diff)
downloadopenvswitch-91bdb33e041ef3e91b19a2a2e1562b95685c37d1.tar.gz
raft: Fix error leak on failure while saving snapshot.
Error should be destroyed before return. Fixes: 1b1d2e6daa56 ("ovsdb: Introduce experimental support for clustered databases.") Acked-by: Han Zhou <hzhou@ovn.org> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'ovsdb')
-rw-r--r--ovsdb/raft.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ovsdb/raft.c b/ovsdb/raft.c
index 3411323aa..728d60175 100644
--- a/ovsdb/raft.c
+++ b/ovsdb/raft.c
@@ -3987,7 +3987,7 @@ raft_handle_install_snapshot_request__(
struct ovsdb_error *error = raft_save_snapshot(raft, new_log_start,
&new_snapshot);
if (error) {
- char *error_s = ovsdb_error_to_string(error);
+ char *error_s = ovsdb_error_to_string_free(error);
VLOG_WARN("could not save snapshot: %s", error_s);
free(error_s);
return false;