From dcce158a3b80d3143b0b148753b28cc2cf26d36d Mon Sep 17 00:00:00 2001
From: Ilya Maximets <i.maximets@ovn.org>
Date: Fri, 20 Nov 2020 01:17:23 +0100
Subject: [PATCH 15/16] ovn-nbctl: Fix IP leak on failure of lr policy
addition.
Fixes: 742474bad730 ("ovn-nbctl: Enhance lr-policy-add to set the options.")
Acked-by: Dumitru Ceara <dceara@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Signed-off-by: Numan Siddique <numans@ovn.org>
(cherry-picked from master commit 47385c83f865306b5c85a61d530e2a9383640ceb)
---
utilities/ovn-nbctl.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/utilities/ovn-nbctl.c b/utilities/ovn-nbctl.c
index af9b396c3..9d04a85a9 100644
--- a/utilities/ovn-nbctl.c
+++ b/utilities/ovn-nbctl.c
@@ -3689,6 +3689,7 @@ nbctl_lr_policy_add(struct ctl_context *ctx)
} else {
ctl_error(ctx, "No value specified for the option : %s", key);
free(key);
+ free(next_hop);
return;
}
free(key);
--
2.28.0