Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 May 2009 15:14:38 +0000 (UTC)
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r192016 - head/sys/cam
Message-ID:  <200905121514.n4CFEcdb025759@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: trasz
Date: Tue May 12 15:14:37 2009
New Revision: 192016
URL: http://svn.freebsd.org/changeset/base/192016

Log:
  Add missing free(9) in error case.
  
  Found with:	Coverity Prevent(tm)
  CID:		4224

Modified:
  head/sys/cam/cam_periph.c

Modified: head/sys/cam/cam_periph.c
==============================================================================
--- head/sys/cam/cam_periph.c	Tue May 12 15:03:47 2009	(r192015)
+++ head/sys/cam/cam_periph.c	Tue May 12 15:14:37 2009	(r192016)
@@ -173,6 +173,7 @@ cam_periph_alloc(periph_ctor_t *periph_c
 	xpt_unlock_buses();
 	if (*p_drv == NULL) {
 		printf("cam_periph_alloc: invalid periph name '%s'\n", name);
+		free(periph, M_CAMPERIPH);
 		return (CAM_REQ_INVALID);
 	}
 



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