Fix free pdu mismatch with alloc
The pdu alloced by iscsi->drv->new_pdu, by free with iscsi_free direct when fail in iscsi_allocate_pdu. Signed-off-by: IriKa Qiu <qiujie.jq@gmail.com>
This commit is contained in:
@@ -205,7 +205,7 @@ iscsi_allocate_pdu(struct iscsi_context *iscsi, enum iscsi_opcode opcode,
|
|||||||
|
|
||||||
if (pdu->outdata.data == NULL) {
|
if (pdu->outdata.data == NULL) {
|
||||||
iscsi_set_error(iscsi, "failed to allocate pdu header");
|
iscsi_set_error(iscsi, "failed to allocate pdu header");
|
||||||
iscsi_free(iscsi, pdu);
|
iscsi->drv->free_pdu(iscsi, pdu);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user