svn commit: r301788 - stable/10/sbin/camcontrol

Garrett Cooper ngie at FreeBSD.org
Fri Jun 10 14:33:22 UTC 2016


Author: ngie
Date: Fri Jun 10 14:33:21 2016
New Revision: 301788
URL: https://svnweb.freebsd.org/changeset/base/301788

Log:
  MFC r299490:
  r299490 (by cem):
  
  camcontrol(8): Fix another trivial double-free
  
  CID:		1331222

Modified:
  stable/10/sbin/camcontrol/fwdownload.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sbin/camcontrol/fwdownload.c
==============================================================================
--- stable/10/sbin/camcontrol/fwdownload.c	Fri Jun 10 14:31:59 2016	(r301787)
+++ stable/10/sbin/camcontrol/fwdownload.c	Fri Jun 10 14:33:21 2016	(r301788)
@@ -488,6 +488,7 @@ fw_validate_ibm(struct cam_device *dev, 
 				CAM_EPF_ALL, stderr);
 
 		cam_freeccb(ccb);
+		ccb = NULL;
 		goto bailout;
 	}
 
@@ -549,7 +550,8 @@ fw_validate_ibm(struct cam_device *dev, 
 		fprintf(stdout, "Firmware file is valid for this drive.\n");
 	retval = 0;
 bailout:
-	cam_freeccb(ccb);
+	if (ccb != NULL)
+		cam_freeccb(ccb);
 
 	return (retval);
 }


More information about the svn-src-stable mailing list