Author: emaste Date: Mon Oct 7 16:45:16 2013 New Revision: 256113 URL: http://svnweb.freebsd.org/changeset/base/256113
Log: Fix resource leaks Found by: Coverity Scan, CID 1016673, 1007118 Approved by: re Modified: head/sbin/camcontrol/fwdownload.c Modified: head/sbin/camcontrol/fwdownload.c ============================================================================== --- head/sbin/camcontrol/fwdownload.c Mon Oct 7 16:33:16 2013 (r256112) +++ head/sbin/camcontrol/fwdownload.c Mon Oct 7 16:45:16 2013 (r256113) @@ -224,6 +224,7 @@ fw_read_img(const char *fw_img_path, con goto bailout; } *num_bytes = img_size; + close(fd); return (buf); bailout: free(buf); @@ -286,6 +287,7 @@ fw_download_img(struct cam_device *cam_d ata_28bit_cmd(&ccb->ataio, ATA_ATA_IDENTIFY, 0, 0, 0); } else { warnx("weird disk type '%s'", type); + cam_freeccb(ccb); return 1; } /* Disable freezing the device queue. */ _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"