Author: mav Date: Wed Sep 10 06:29:31 2014 New Revision: 271353 URL: http://svnweb.freebsd.org/changeset/base/271353
Log: Fix memory leak on error, reported by Coverity. CID: 1007773 Modified: head/sys/cam/ctl/ctl.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Wed Sep 10 06:25:18 2014 (r271352) +++ head/sys/cam/ctl/ctl.c Wed Sep 10 06:29:31 2014 (r271353) @@ -2899,6 +2899,7 @@ ctl_ioctl(struct cdev *dev, u_long cmd, lun = softc->ctl_luns[err_desc->lun_id]; if (lun == NULL) { mtx_unlock(&softc->ctl_lock); + free(new_err_desc, M_CTL); printf("%s: CTL_ERROR_INJECT: invalid LUN %ju\n", __func__, (uintmax_t)err_desc->lun_id); retval = EINVAL; _______________________________________________ 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"