summaryrefslogtreecommitdiffstats
path: root/sys/dev/hptmv
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2005-03-29 01:46:25 +0000
committersam <sam@FreeBSD.org>2005-03-29 01:46:25 +0000
commitfd379eb29af4e0638ef7b2c1ada42ae654aa65b6 (patch)
tree9a5fe659d5badd09d8bf759d560d3209aa6c9524 /sys/dev/hptmv
parent1d91e248e52e6eaddddedbc66bcbe415cbb0e2f7 (diff)
downloadFreeBSD-src-fd379eb29af4e0638ef7b2c1ada42ae654aa65b6.zip
FreeBSD-src-fd379eb29af4e0638ef7b2c1ada42ae654aa65b6.tar.gz
plug resource leak
Noticed by: Coverity Prevent analysis tool
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 3436950..fa2d41d 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;
OpenPOWER on IntegriCloud