Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit f6549f53 authored by Niklas Cassel's avatar Niklas Cassel
Browse files

ata,scsi: libata-core: Do not leak memory for ata_port struct members

libsas is currently not freeing all the struct ata_port struct members,
e.g. ncq_sense_buf for a driver supporting Command Duration Limits (CDL).

Add a function, ata_port_free(), that is used to free a ata_port,
including its struct members. It makes sense to keep the code related to
freeing a ata_port in its own function, which will also free all the
struct members of struct ata_port.

Fixes: 18bd7718

 ("scsi: ata: libata: Handle completion of CDL commands using policy 0xD")
Reviewed-by: default avatarJohn Garry <john.g.garry@oracle.com>
Link: https://lore.kernel.org/r/20240629124210.181537-8-cassel@kernel.org


Signed-off-by: default avatarNiklas Cassel <cassel@kernel.org>
parent 5d92c7c5
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment