From 90deedbeeb26efb1e042f6c0cd0d7caad4fb1b90 Mon Sep 17 00:00:00 2001
From: Ilya Maximets <i.maximets@ovn.org>
Date: Fri, 20 Nov 2020 01:17:18 +0100
Subject: [PATCH 10/16] ovn-nbctl: Fix error leak on duplicated switch port.
Error is allocated from heap and should be freed.
Fixes: 738295605b44 ("ovn: Detect and prevent duplicate address assignments.")
Acked-by: Dumitru Ceara <dceara@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Signed-off-by: Numan Siddique <numans@ovn.org>
---
utilities/ovn-nbctl.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/utilities/ovn-nbctl.c b/utilities/ovn-nbctl.c
index dfcf67cfd..f4c4f9385 100644
--- a/utilities/ovn-nbctl.c
+++ b/utilities/ovn-nbctl.c
@@ -1683,6 +1683,7 @@ nbctl_lsp_set_addresses(struct ctl_context *ctx)
error = lsp_contains_duplicates(ls, lsp, ctx->argv[i]);
if (error) {
ctl_error(ctx, "%s", error);
+ free(error);
return;
}
}
--
2.28.0