svn commit: r192016 - head/sys/cam

Edward Tomasz Napierala trasz at FreeBSD.org
Tue May 12 15:14:39 UTC 2009


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);
 	}
 


More information about the svn-src-all mailing list