From c5c6059574e490e06dc1fa29a0bf9c7167f6e487 Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Sat, 2 Aug 2014 23:20:43 +0000 Subject: [PATCH] Rework r269444 to work also for lists without IDs. MFC after: 3 days --- sys/cam/ctl/ctl_tpc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/cam/ctl/ctl_tpc.c b/sys/cam/ctl/ctl_tpc.c index 4197287dbdf..06263b365fb 100644 --- a/sys/cam/ctl/ctl_tpc.c +++ b/sys/cam/ctl/ctl_tpc.c @@ -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;