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