Signed-off-by: Daniel Henrique Barboza <danielhb413(a)gmail.com>
---
src/nwfilter/nwfilter_ebiptables_driver.c | 11 ++++-------
src/nwfilter/nwfilter_learnipaddr.c | 3 +--
2 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/src/nwfilter/nwfilter_ebiptables_driver.c
b/src/nwfilter/nwfilter_ebiptables_driver.c
index 0cf8149193..eec1414023 100644
--- a/src/nwfilter/nwfilter_ebiptables_driver.c
+++ b/src/nwfilter/nwfilter_ebiptables_driver.c
@@ -1046,7 +1046,7 @@ iptablesHandlePortData(virFirewallPtr fw,
if (printDataType(vars,
portstr, sizeof(portstr),
&portData->dataSrcPortStart) < 0)
- goto err_exit;
+ return -1;
if (ENTRY_WANT_NEG_SIGN(&portData->dataSrcPortStart))
virFirewallRuleAddArg(fw, fwrule, "!");
@@ -1056,7 +1056,7 @@ iptablesHandlePortData(virFirewallPtr fw,
if (printDataType(vars,
portstralt, sizeof(portstralt),
&portData->dataSrcPortEnd) < 0)
- goto err_exit;
+ return -1;
virFirewallRuleAddArgFormat(fw, fwrule,
"%s:%s", portstr, portstralt);
@@ -1069,7 +1069,7 @@ iptablesHandlePortData(virFirewallPtr fw,
if (printDataType(vars,
portstr, sizeof(portstr),
&portData->dataDstPortStart) < 0)
- goto err_exit;
+ return -1;
if (ENTRY_WANT_NEG_SIGN(&portData->dataDstPortStart))
virFirewallRuleAddArg(fw, fwrule, "!");
@@ -1079,7 +1079,7 @@ iptablesHandlePortData(virFirewallPtr fw,
if (printDataType(vars,
portstralt, sizeof(portstralt),
&portData->dataDstPortEnd) < 0)
- goto err_exit;
+ return -1;
virFirewallRuleAddArgFormat(fw, fwrule,
"%s:%s", portstr, portstralt);
@@ -1089,9 +1089,6 @@ iptablesHandlePortData(virFirewallPtr fw,
}
return 0;
-
- err_exit:
- return -1;
}
diff --git a/src/nwfilter/nwfilter_learnipaddr.c b/src/nwfilter/nwfilter_learnipaddr.c
index 9b4fab7ffb..46ef65401c 100644
--- a/src/nwfilter/nwfilter_learnipaddr.c
+++ b/src/nwfilter/nwfilter_learnipaddr.c
@@ -725,7 +725,7 @@ virNWFilterLearnIPAddress(virNWFilterTechDriverPtr techdriver,
}
if (VIR_ALLOC(req) < 0)
- goto err_no_req;
+ return -1;
if (!(req->binding = virNWFilterBindingDefCopy(binding)))
goto err_free_req;
@@ -752,7 +752,6 @@ virNWFilterLearnIPAddress(virNWFilterTechDriverPtr techdriver,
virNWFilterDeregisterLearnReq(ifindex);
err_free_req:
virNWFilterIPAddrLearnReqFree(req);
- err_no_req:
return -1;
}
--
2.24.1