Re: [PATCH v2] crypto: caam - fix memleak in caam_jr module

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

 



On Thu, 3 Jul 2014 15:07:50 +0300
Cristian Stoica <cristian.stoica@xxxxxxxxxxxxx> wrote:

> This patch fixes a memory leak that appears when caam_jr module is unloaded.
> 
> Cc: <stable@xxxxxxxxxxxxxxx> # 3.13+
> Signed-off-by: Cristian Stoica <cristian.stoica@xxxxxxxxxxxxx>
> ---
>  drivers/crypto/caam/jr.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/crypto/caam/jr.c b/drivers/crypto/caam/jr.c
> index 1d80bd3..e0b91fc 100644
> --- a/drivers/crypto/caam/jr.c
> +++ b/drivers/crypto/caam/jr.c
> @@ -453,7 +453,7 @@ static int caam_jr_probe(struct platform_device *pdev)
>  	int error;
>  
>  	jrdev = &pdev->dev;
> -	jrpriv = kmalloc(sizeof(struct caam_drv_private_jr),
> +	jrpriv = devm_kzalloc(jrdev, sizeof(struct caam_drv_private_jr),
>  			 GFP_KERNEL);

alignment.  Also, why are we replacing a _m_alloc with a _z_alloc?

Please start using get_maintainer.pl.

Thanks,

Kim
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux