summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYunjian Wang <wangyunjian@huawei.com>2022-06-06 19:06:38 +0800
committerIlya Maximets <i.maximets@ovn.org>2022-06-28 13:25:38 +0200
commite1f59874d97a02816fbbce514698fabc64c39c73 (patch)
tree3408b8ef84237e7aacbc56788b21249133f61adf
parentf4f51a53c10b0fddf3c8c81e553cc5aba5078fa3 (diff)
downloadopenvswitch-e1f59874d97a02816fbbce514698fabc64c39c73.tar.gz
ovsdb: Fix memory leak on error path in ovsdb_file_read__().
Found by Coverity. Fixes: 1b1d2e6daa56 ("ovsdb: Introduce experimental support for clustered databases.") Signed-off-by: Yunjian Wang <wangyunjian@huawei.com> Acked-by: Mike Pattrick <mkp@redhat.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
-rw-r--r--ovsdb/file.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ovsdb/file.c b/ovsdb/file.c
index 0af077fce..b86763c42 100644
--- a/ovsdb/file.c
+++ b/ovsdb/file.c
@@ -458,6 +458,7 @@ ovsdb_file_read__(const char *filename, bool rw,
error = ovsdb_txn_replay_commit(txn);
if (error) {
+ ovsdb_error_destroy(error);
ovsdb_storage_unread(storage);
break;
}