[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-kernel
Subject: Re: [PATCH v2] Broadcom CNIC core network driver: fix mem leak on
From: David Miller <davem () davemloft ! net>
Date: 2010-12-31 19:20:25
Message-ID: 20101231.112025.245393392.davem () davemloft ! net
[Download RAW message or body]
From: Jesper Juhl <jj@chaosbits.net>
Date: Sun, 26 Dec 2010 21:57:39 +0100 (CET)
> We are leaking memory in drivers/net/cnic.c::cnic_alloc_uio_rings() if
> either of the calls to dma_alloc_coherent() fail. This patch fixes it by
> freeing both the memory allocated with kzalloc() and memory allocated with
> previous calls to dma_alloc_coherent() when there's a failure.
>
> Thanks to Joe Perches <joe@perches.com> for suggesting a better
> implementation than my initial version.
>
>
> Signed-off-by: Jesper Juhl <jj@chaosbits.net>
...
> + err_dma:
> + dma_free_coherent(&udev->pdev->dev, udev->l2_ring_size,
> + udev->l2_ring, udev->l2_ring_map);
Space before tab in indentation, improperly positioned third argument
indentation.
I fixed all of this up, but please do not skimp on making sure these
details are taken care of when updating your patch in response to feedback.
Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic