From 1337185fe9aa291a977afd8d58fb53ec32295689 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 29 Sep 2013 21:05:37 +0200 Subject: [PATCH] test_read6_simple: Avoid triggering a use-after-free Do not use the 'task' pointer after the memory it points at has been freed. Detected via valgrind. Signed-off-by: Bart Van Assche --- test-tool/test_read6_simple.c | 1 - 1 file changed, 1 deletion(-) diff --git a/test-tool/test_read6_simple.c b/test-tool/test_read6_simple.c index 617f4ac..b287514 100644 --- a/test-tool/test_read6_simple.c +++ b/test-tool/test_read6_simple.c @@ -70,7 +70,6 @@ test_read6_simple(void) if (task->status != SCSI_STATUS_GOOD) { logging(LOG_NORMAL, "[FAILED] READ6 command: " "failed with sense. %s", iscsi_get_error(iscsic)); - scsi_free_scsi_task(task); } CU_ASSERT_EQUAL(task->status, SCSI_STATUS_GOOD);