Searched hist:"2 e077f8e" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/dma/ |
H A D | fsldma.c | 2e077f8e Fri May 15 11:59:46 CDT 2009 Ira Snyder <iws@ovro.caltech.edu> fsldma: fix memory leak on error path in fsl_dma_prep_memcpy()
When preparing a memcpy operation, if the kernel fails to allocate memory for a link descriptor after the first link descriptor has already been allocated, then some memory will never be released. Fix the problem by walking the list of allocated descriptors backwards, and freeing the allocated descriptors back into the DMA pool.
Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu> Signed-off-by: Li Yang <leoli@freescale.com> 2e077f8e Fri May 15 11:59:46 CDT 2009 Ira Snyder <iws@ovro.caltech.edu> fsldma: fix memory leak on error path in fsl_dma_prep_memcpy() When preparing a memcpy operation, if the kernel fails to allocate memory for a link descriptor after the first link descriptor has already been allocated, then some memory will never be released. Fix the problem by walking the list of allocated descriptors backwards, and freeing the allocated descriptors back into the DMA pool. Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu> Signed-off-by: Li Yang <leoli@freescale.com>
|