Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Mar 2018 01:28:55 +0000 (UTC)
From:      Conrad Meyer <cem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r330717 - head/sys/cam/nvme
Message-ID:  <201803100128.w2A1StTF048968@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 	}
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803100128.w2A1StTF048968>