Fixed a memory leak.
Submitted by: Stanford Metacompilation research group
This commit is contained in:
parent
7a1096b2a1
commit
d658e46d99
@ -186,7 +186,7 @@ static void
|
|||||||
vpo_cam_rescan(struct vpo_data *vpo)
|
vpo_cam_rescan(struct vpo_data *vpo)
|
||||||
{
|
{
|
||||||
struct cam_path *path;
|
struct cam_path *path;
|
||||||
union ccb *ccb = malloc(sizeof(union ccb), M_TEMP, M_WAITOK | M_ZERO);
|
union ccb *ccb;
|
||||||
|
|
||||||
if (xpt_create_path(&path, xpt_periph, cam_sim_path(vpo->sim), 0, 0)
|
if (xpt_create_path(&path, xpt_periph, cam_sim_path(vpo->sim), 0, 0)
|
||||||
!= CAM_REQ_CMP) {
|
!= CAM_REQ_CMP) {
|
||||||
@ -194,6 +194,7 @@ vpo_cam_rescan(struct vpo_data *vpo)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ccb = malloc(sizeof(union ccb), M_TEMP, M_WAITOK | M_ZERO);
|
||||||
xpt_setup_ccb(&ccb->ccb_h, path, 5/*priority (low)*/);
|
xpt_setup_ccb(&ccb->ccb_h, path, 5/*priority (low)*/);
|
||||||
ccb->ccb_h.func_code = XPT_SCAN_BUS;
|
ccb->ccb_h.func_code = XPT_SCAN_BUS;
|
||||||
ccb->ccb_h.cbfcnp = vpo_cam_rescan_callback;
|
ccb->ccb_h.cbfcnp = vpo_cam_rescan_callback;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user