aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/hptmv
diff options
context:
space:
mode:
authorSam Leffler <sam@FreeBSD.org>2005-03-29 01:46:25 +0000
committerSam Leffler <sam@FreeBSD.org>2005-03-29 01:46:25 +0000
commit72bd2eaecbea992d6d9ef3005edebeab00b8524b (patch)
tree9a5fe659d5badd09d8bf759d560d3209aa6c9524 /sys/dev/hptmv
parentb083b7c98d9f5c141e65fb34793f5e1e0e109e5b (diff)
downloadsrc-72bd2eaecbea992d6d9ef3005edebeab00b8524b.tar.gz
src-72bd2eaecbea992d6d9ef3005edebeab00b8524b.zip
plug resource leak
Noticed by: Coverity Prevent analysis tool
Notes
Notes: svn path=/head/; revision=144264
Diffstat (limited to 'sys/dev/hptmv')
-rw-r--r--sys/dev/hptmv/entry.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/dev/hptmv/entry.c b/sys/dev/hptmv/entry.c
index 34369507a5fb..fa2d41d698b4 100644
--- a/sys/dev/hptmv/entry.c
+++ b/sys/dev/hptmv/entry.c
@@ -2035,11 +2035,13 @@ hpt_attach(device_t dev)
if ((hpt_vsim = cam_sim_alloc(hpt_action, hpt_poll,__str(PROC_DIR_NAME),
pAdapter, device_get_unit(pAdapter->hpt_dev), /*untagged*/1,
/*tagged*/8, devq)) == NULL) {
+ free(ccb, M_DEVBUF);
cam_simq_free(devq);
return ENOMEM;
}
if(xpt_bus_register(hpt_vsim, 0) != CAM_SUCCESS) {
+ free(ccb, M_DEVBUF);
cam_sim_free(hpt_vsim, /*free devq*/ TRUE);
hpt_vsim = NULL;
return ENXIO;
@@ -2048,6 +2050,7 @@ hpt_attach(device_t dev)
if(xpt_create_path(&pAdapter->path, /*periph */ NULL,
cam_sim_path(hpt_vsim), CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD)
!= CAM_REQ_CMP) {
+ free(ccb, M_DEVBUF);
xpt_bus_deregister(cam_sim_path(hpt_vsim));
cam_sim_free(hpt_vsim, /*free_devq*/TRUE);
hpt_vsim = NULL;