Re: [PATCH] vme: Free DMA resource allocation structure

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

 



Sorry, took me a while to get the bits together to test this, some of my kit
had gone walkies...

Martyn

On 06/06/13 12:29, Martyn Welch wrote:
> There is a memory leak in the function vme_dma_free(). The resource
> structure allocated in vme_dma_request() needs to be free'd in
> vme_dma_free().
> 
> Reported-by: De Roo, Steven <steven.deroo@xxxxxxxxxxxxxxxxx>
> Signed-off-by: Martyn Welch <martyn.welch@xxxxxx>
> ---
>  drivers/vme/vme.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/vme/vme.c b/drivers/vme/vme.c
> index 5e6c7d7..f6856b4 100644
> --- a/drivers/vme/vme.c
> +++ b/drivers/vme/vme.c
> @@ -959,6 +959,8 @@ int vme_dma_free(struct vme_resource *resource)
>  
>  	mutex_unlock(&ctrlr->mtx);
>  
> +	kfree(resource);
> +
>  	return 0;
>  }
>  EXPORT_SYMBOL(vme_dma_free);
> 


-- 
Martyn Welch (Lead Software Engineer)  | Registered in England and Wales
GE Intelligent Platforms               | (3828642) at 100 Barbirolli Square
T +44(0)1327322748                     | Manchester, M2 3AB
E martyn.welch@xxxxxx                  | VAT:GB 927559189
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux