svn commit: r330717 - head/sys/cam/nvme
Conrad Meyer
cem at FreeBSD.org
Sat Mar 10 01:28:56 UTC 2018
Author: cem
Date: Sat Mar 10 01:28:55 2018
New Revision: 330717
URL: https://svnweb.freebsd.org/changeset/base/330717
Log:
nvme_da: Fix minor memory leak in error case
Reported by: cppcheck
Sponsored by: Dell EMC Isilon
Modified:
head/sys/cam/nvme/nvme_da.c
Modified: head/sys/cam/nvme/nvme_da.c
==============================================================================
--- head/sys/cam/nvme/nvme_da.c Sat Mar 10 01:07:30 2018 (r330716)
+++ head/sys/cam/nvme/nvme_da.c Sat Mar 10 01:28:55 2018 (r330717)
@@ -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);
}
More information about the svn-src-all
mailing list