> @@ -209,6 +216,7 @@ int core_emulate_set_target_port_groups(struct se_cmd *cmd) > * REQUEST, and the additional sense code set to INVALID > * FIELD IN PARAMETER LIST. > */ > + transport_kunmap_first_data_page(cmd); > return PYX_TRANSPORT_INVALID_PARAMETER_LIST; > } > rc = -1; > @@ -260,8 +268,10 @@ int core_emulate_set_target_port_groups(struct se_cmd *cmd) > * If not matching target port group ID can be located > * throw an exception with ASCQ: INVALID_PARAMETER_LIST > */ > - if (rc != 0) > + if (rc != 0) { > + transport_kunmap_first_data_page(cmd); > return PYX_TRANSPORT_INVALID_PARAMETER_LIST; > + } It would be good to use goto unwinding here and in all other control CDB handlers that may return errors. -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html