Re: [PATCH 09/10] qla4xxx: Fix memory leak in func qla4_84xx_config_acb()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/24/2014 09:07 PM, vikas.chaudhary@xxxxxxxxxx wrote:
> From: Vikas Chaudhary <vikas.chaudhary@xxxxxxxxxx>
> 
> Use correct goto statement to free dma memory in case of
> failure in function qla4_84xx_config_acb()
> 
> Signed-off-by: Vikas Chaudhary <vikas.chaudhary@xxxxxxxxxx>
> ---
>  drivers/scsi/qla4xxx/ql4_mbx.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/qla4xxx/ql4_mbx.c b/drivers/scsi/qla4xxx/ql4_mbx.c
> index 0a6b782..1345c0e 100644
> --- a/drivers/scsi/qla4xxx/ql4_mbx.c
> +++ b/drivers/scsi/qla4xxx/ql4_mbx.c
> @@ -2381,7 +2381,7 @@ int qla4_84xx_config_acb(struct scsi_qla_host *ha, int acb_config)
>  			ql4_printk(KERN_ERR, ha, "%s: Unable to alloc acb\n",
>  				   __func__);
>  			rval = QLA_ERROR;
> -			goto exit_config_acb;
> +			goto exit_free_acb;
>  		}
>  		memcpy(ha->saved_acb, acb, acb_len);
>  		break;
> 

This patch looks ok, but is it possible to still leak the ha->saved_acb
still? If you were going to do ACB_CONFIG_SET but the dma_alloc_coherent
failed then it would not be freed.
--
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




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux