From 9e0d30e20d399bf048ffd478b70fb6b67dbcc217 Mon Sep 17 00:00:00 2001 From: Edward Tomasz Napierala Date: Tue, 2 Apr 2013 09:38:04 +0000 Subject: [PATCH] Fix panic in the error path caused by recursive acquisition of XPT topology lock. Reviewed by: ken --- sys/cam/cam_periph.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/cam/cam_periph.c b/sys/cam/cam_periph.c index fa4fa04ccc46..55c90dea0b00 100644 --- a/sys/cam/cam_periph.c +++ b/sys/cam/cam_periph.c @@ -218,9 +218,9 @@ cam_periph_alloc(periph_ctor_t *periph_ctor, } if (*p_drv == NULL) { printf("cam_periph_alloc: invalid periph name '%s'\n", name); + xpt_unlock_buses(); xpt_free_path(periph->path); free(periph, M_CAMPERIPH); - xpt_unlock_buses(); return (CAM_REQ_INVALID); } periph->unit_number = camperiphunit(*p_drv, path_id, target_id, lun_id);