* retry logic set to true. If the thread isn't created, then no big
* deal since it's still possible to refresh the pool later.
*/
- if (VIR_ALLOC(cbdata) == 0) {
- memcpy(cbdata->pool_uuid, def->uuid, VIR_UUID_BUFLEN);
- cbdata->fchost_name = g_steal_pointer(&name);
-
- if (virThreadCreateFull(&thread, false, virStoragePoolFCRefreshThread,
- "scsi-refresh", false, cbdata) < 0) {
- /* Oh well - at least someone can still refresh afterwards */
- VIR_DEBUG("Failed to create FC Pool Refresh Thread");
- virStoragePoolFCRefreshDataFree(cbdata);
- }
+ if (VIR_ALLOC(cbdata) < 0)
+ return -1;
+
+ memcpy(cbdata->pool_uuid, def->uuid, VIR_UUID_BUFLEN);
+ cbdata->fchost_name = g_steal_pointer(&name);
+
+ if (virThreadCreateFull(&thread, false, virStoragePoolFCRefreshThread,
+ "scsi-refresh", false, cbdata) < 0) {
+ /* Oh well - at least someone can still refresh afterwards */
+ VIR_DEBUG("Failed to create FC Pool Refresh Thread");
+ virStoragePoolFCRefreshDataFree(cbdata);
}
return 0;