From 604cbb45b970ec10dee83d97482f3d57b5c240f5 Mon Sep 17 00:00:00 2001 From: Ilya Maximets Date: Fri, 23 Oct 2020 20:20:04 +0200 Subject: 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 Signed-off-by: Ilya Maximets --- ovsdb/raft.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ovsdb/raft.c b/ovsdb/raft.c index 00bf3687f..7ba75f6a3 100644 --- a/ovsdb/raft.c +++ b/ovsdb/raft.c @@ -3738,7 +3738,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; -- cgit v1.2.1