Cleanup needed instead of direct return.

Fixes: 43f42ecb3a5a ("Use normalized IP addreses in `ovn-nbctl lr-nat-add`")
Signed-off-by: Ilya Maximets <[email protected]>
---
 utilities/ovn-nbctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/utilities/ovn-nbctl.c b/utilities/ovn-nbctl.c
index 89537edf0..526dbf86c 100644
--- a/utilities/ovn-nbctl.c
+++ b/utilities/ovn-nbctl.c
@@ -4311,7 +4311,7 @@ nbctl_lr_nat_add(struct ctl_context *ctx)
 
     if (strcmp(nat_type, "dnat_and_snat") && stateless) {
         ctl_error(ctx, "stateless is not applicable to dnat or snat types");
-        return;
+        goto cleanup;
     }
 
     int is_snat = !strcmp("snat", nat_type);
-- 
2.25.4

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to