Signed-off-by: Daniel Henrique Barboza <danielhb413(a)gmail.com>
---
src/storage/storage_backend_iscsi_direct.c | 4 +---
src/storage/storage_driver.c | 4 ++--
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/storage/storage_backend_iscsi_direct.c
b/src/storage/storage_backend_iscsi_direct.c
index 2afa617cc1..3a5e2bb9f0 100644
--- a/src/storage/storage_backend_iscsi_direct.c
+++ b/src/storage/storage_backend_iscsi_direct.c
@@ -572,13 +572,11 @@ virStorageBackendISCSIDirectSetConnection(virStoragePoolObjPtr
pool,
if (portalRet)
*portalRet = g_steal_pointer(&portal);
- cleanup:
return iscsi;
error:
iscsi_destroy_context(iscsi);
- iscsi = NULL;
- goto cleanup;
+ return NULL;
}
static int
diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c
index 6bbf52f729..0bb116cf08 100644
--- a/src/storage/storage_driver.c
+++ b/src/storage/storage_driver.c
@@ -2771,13 +2771,13 @@ storageConnectStoragePoolEventRegisterAny(virConnectPtr conn,
int callbackID = -1;
if (virConnectStoragePoolEventRegisterAnyEnsureACL(conn) < 0)
- goto cleanup;
+ return -1;
if (virStoragePoolEventStateRegisterID(conn, driver->storageEventState,
pool, eventID, callback,
opaque, freecb, &callbackID) < 0)
callbackID = -1;
- cleanup:
+
return callbackID;
}
--
2.24.1