diff options
author | Ye Li <ye.li@nxp.com> | 2018-11-14 01:16:35 -0800 |
---|---|---|
committer | Ye Li <ye.li@nxp.com> | 2020-04-26 23:26:37 -0700 |
commit | b5e24105391e8da82d65e95c966dbf67bfebee59 (patch) | |
tree | d697983e8163b371a1c09cd53bb32073b634c131 /drivers/ata | |
parent | 53d6ac19ebc27828beeff92e7dbe7317e0026919 (diff) |
MLK-20356-2 dwc_ahsata: Fix incorrect free
Fix coverity issue CID 43665: Free of address-of expression (BAD_FREE)
incorrect_free: free frees incorrect pointer pp.
pp points the port array field of struct ahci_uc_priv, should not free it.
Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit da3f3a081690d4d7fc901d922d01e2bbe6cb4eb5)
(cherry picked from commit 9e1d2397bbf6bc4b6a723e9e362ac92a235a44be)
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/dwc_ahsata.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/ata/dwc_ahsata.c b/drivers/ata/dwc_ahsata.c index 77369f9c72a..2bc1de8b98a 100644 --- a/drivers/ata/dwc_ahsata.c +++ b/drivers/ata/dwc_ahsata.c @@ -450,7 +450,6 @@ static int ahci_port_start(struct ahci_uc_priv *uc_priv, u8 port) mem = (u32)malloc(AHCI_PORT_PRIV_DMA_SZ + 1024); if (!mem) { - free(pp); printf("No mem for table!\n"); return -ENOMEM; } |