test-tool/*_dpofua: Fix memory leaks in error paths
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
This commit is contained in:
committed by
Ronnie Sahlberg
parent
e9536d3333
commit
9ab1cc8baa
@@ -47,14 +47,11 @@ test_report_supported_opcodes_one_command(void)
|
||||
logging(LOG_NORMAL, "[SKIPPED] READ_SUPPORTED_OPCODES is not "
|
||||
"implemented.");
|
||||
CU_PASS("READ_SUPPORTED_OPCODES is not implemented.");
|
||||
scsi_free_scsi_task(rso_task);
|
||||
return;
|
||||
goto out;
|
||||
}
|
||||
CU_ASSERT_EQUAL(ret, 0);
|
||||
if (ret != 0) {
|
||||
scsi_free_scsi_task(rso_task);
|
||||
return;
|
||||
}
|
||||
if (ret != 0)
|
||||
goto out;
|
||||
|
||||
logging(LOG_VERBOSE, "Unmarshall the DATA-IN buffer");
|
||||
rsoc = scsi_datain_unmarshall(rso_task);
|
||||
@@ -64,7 +61,7 @@ test_report_supported_opcodes_one_command(void)
|
||||
"for ReportSupportedOpcodes\n");
|
||||
CU_FAIL("Target did not return any data for "
|
||||
"ReportSupportedOpcodes");
|
||||
return;
|
||||
goto out;
|
||||
}
|
||||
|
||||
logging(LOG_VERBOSE, "Verify read one-command works for all supported "
|
||||
@@ -200,6 +197,6 @@ test_report_supported_opcodes_one_command(void)
|
||||
scsi_free_scsi_task(one_task);
|
||||
}
|
||||
|
||||
|
||||
out:
|
||||
scsi_free_scsi_task(rso_task);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user