Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 2 Aug 2014 23:20:43 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r269450 - head/sys/cam/ctl
Message-ID:  <201408022320.s72NKhdH041393@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201408022320.s72NKhdH041393>