aboutsummaryrefslogtreecommitdiffstats
path: root/sys/cam/nvme/nvme_da.c
diff options
context:
space:
mode:
authorConrad Meyer <cem@FreeBSD.org>2018-03-10 01:28:55 +0000
committerConrad Meyer <cem@FreeBSD.org>2018-03-10 01:28:55 +0000
commit2e1fccf2cf9ea48d28bce65e80ff99fd16a4a1e7 (patch)
treee97d8bc75ec6c5c8a7ab44bf14a52d86d122eff1 /sys/cam/nvme/nvme_da.c
parent5c4ac7c2afbbac179b03f1c0e4ada5302104e321 (diff)
downloadsrc-2e1fccf2cf9ea48d28bce65e80ff99fd16a4a1e7.tar.gz
src-2e1fccf2cf9ea48d28bce65e80ff99fd16a4a1e7.zip
nvme_da: Fix minor memory leak in error case
Reported by: cppcheck Sponsored by: Dell EMC Isilon
Notes
Notes: svn path=/head/; revision=330717
Diffstat (limited to 'sys/cam/nvme/nvme_da.c')
-rw-r--r--sys/cam/nvme/nvme_da.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/cam/nvme/nvme_da.c b/sys/cam/nvme/nvme_da.c
index 0cd4cc4b9512..0ed589e5ca5c 100644
--- a/sys/cam/nvme/nvme_da.c
+++ b/sys/cam/nvme/nvme_da.c
@@ -695,6 +695,7 @@ ndaregister(struct cam_periph *periph, void *arg)
if (cam_iosched_init(&softc->cam_iosched, periph) != 0) {
printf("ndaregister: Unable to probe new device. "
"Unable to allocate iosched memory\n");
+ free(softc, M_DEVBUF);
return(CAM_REQ_CMP_ERR);
}