diff --git a/sys/cam/cam_periph.c b/sys/cam/cam_periph.c index 368d409c03c3..31bb24c3dbb4 100644 --- a/sys/cam/cam_periph.c +++ b/sys/cam/cam_periph.c @@ -173,6 +173,7 @@ cam_periph_alloc(periph_ctor_t *periph_ctor, xpt_unlock_buses(); if (*p_drv == NULL) { printf("cam_periph_alloc: invalid periph name '%s'\n", name); + free(periph, M_CAMPERIPH); return (CAM_REQ_INVALID); }