From owner-svn-src-all@FreeBSD.ORG Mon Jun 23 13:23:52 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6717ACED; Mon, 23 Jun 2014 13:23:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 53BFF278C; Mon, 23 Jun 2014 13:23:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5NDNqtw032691; Mon, 23 Jun 2014 13:23:52 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5NDNqeX032690; Mon, 23 Jun 2014 13:23:52 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201406231323.s5NDNqeX032690@svn.freebsd.org> From: Alexander Motin Date: Mon, 23 Jun 2014 13:23:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267794 - stable/9/sys/cam/ctl X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jun 2014 13:23:52 -0000 Author: mav Date: Mon Jun 23 13:23:51 2014 New Revision: 267794 URL: http://svnweb.freebsd.org/changeset/base/267794 Log: MFC r267429: Fix some leaks on LUN creation error. Modified: stable/9/sys/cam/ctl/ctl_backend_block.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/9/sys/cam/ctl/ctl_backend_block.c Mon Jun 23 13:20:14 2014 (r267793) +++ stable/9/sys/cam/ctl/ctl_backend_block.c Mon Jun 23 13:23:51 2014 (r267794) @@ -1818,9 +1818,14 @@ ctl_be_block_create(struct ctl_be_block_ bailout_error: req->status = CTL_LUN_ERROR; + if (be_lun->io_taskqueue != NULL) + taskqueue_free(be_lun->io_taskqueue); ctl_be_block_close(be_lun); - - free(be_lun->dev_path, M_CTLBLK); + if (be_lun->dev_path != NULL) + free(be_lun->dev_path, M_CTLBLK); + if (be_lun->lun_zone != NULL) + uma_zdestroy(be_lun->lun_zone); + mtx_destroy(&be_lun->lock); free(be_lun, M_CTLBLK); return (retval);