On a Tuesday in 2020, John Ferlan wrote:
On 7/7/20 5:08 PM, Laine Stump wrote:All these cleanup/error labels were reduced to having just "return ret" by a previous patch, so get rid of them and return directly. Signed-off-by: Laine Stump <laine@xxxxxxxxxx> --- src/network/bridge_driver.c | 264 ++++++++++++------------------ src/network/bridge_driver_linux.c | 15 +- 2 files changed, 113 insertions(+), 166 deletions(-) diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index 31bd0dd92c..79b2ca3330 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c[...] Coverity noted there's a leak with this part of the change for @field...@@ -2207,7 +2164,6 @@ networkSetIPv6Sysctls(virNetworkObjPtr obj) { virNetworkDefPtr def = virNetworkObjGetDef(obj); g_autofree char *field = NULL; - int ret = -1; bool enableIPv6 = !!virNetworkDefGetIPByIndex(def, AF_INET6, 0); /* set disable_ipv6 if there are no ipv6 addresses defined for the @@ -2221,15 +2177,14 @@ networkSetIPv6Sysctls(virNetworkObjPtr obj) if (!enableIPv6) VIR_DEBUG("ipv6 appears to already be disabled on %s", def->bridge); - ret = 0; - goto cleanup; + return 0; }Below here doesn't match w/ current source, but I assume you know that. Looks like a mis-merge with the review from the previous patch.
Should be fixed in git master by: commit 5c50d1dda5664d480e6370111c0218947706bd31 Author: Ján Tomko <jtomko@xxxxxxxxxx> CommitDate: 2020-07-21 14:55:00 +0200 network: split out networkSetIPv6Sysctl https://gitlab.com/libvirt/libvirt/-/commit/5c50d1dda5664d480e6370111c0218947706bd31 Jano
Attachment:
signature.asc
Description: PGP signature