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; }