From owner-svn-src-all@FreeBSD.ORG Sat Aug 2 23:20:43 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 E7B27D8B; Sat, 2 Aug 2014 23:20:43 +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 D5C3729DD; Sat, 2 Aug 2014 23:20:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s72NKh3J041394; Sat, 2 Aug 2014 23:20:43 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s72NKhdH041393; Sat, 2 Aug 2014 23:20:43 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201408022320.s72NKhdH041393@svn.freebsd.org> From: Alexander Motin Date: Sat, 2 Aug 2014 23:20:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269450 - head/sys/cam/ctl X-SVN-Group: head 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: Sat, 02 Aug 2014 23:20:44 -0000 Author: mav Date: Sat Aug 2 23:20:43 2014 New Revision: 269450 URL: http://svnweb.freebsd.org/changeset/base/269450 Log: Rework r269444 to work also for lists without IDs. MFC after: 3 days Modified: head/sys/cam/ctl/ctl_tpc.c Modified: head/sys/cam/ctl/ctl_tpc.c ============================================================================== --- head/sys/cam/ctl/ctl_tpc.c Sat Aug 2 22:25:24 2014 (r269449) +++ head/sys/cam/ctl/ctl_tpc.c Sat Aug 2 23:20:43 2014 (r269450) @@ -942,14 +942,14 @@ tpc_process(struct tpc_list *list) done: //printf("ZZZ done\n"); + free(list->params, M_CTL); + list->params = NULL; mtx_lock(&lun->lun_lock); if ((list->flags & EC_LIST_ID_USAGE_MASK) == EC_LIST_ID_USAGE_NONE) { TAILQ_REMOVE(&lun->tpc_lists, list, links); free(list, M_CTL); } else { list->completed = 1; - free(list->params, M_CTL); - list->params = NULL; list->sense_data = ctsio->sense_data; list->sense_len = ctsio->sense_len; list->scsi_status = ctsio->scsi_status;