From: Martyn Welch Date: Thu, 6 Jun 2013 11:29:16 +0000 (+0100) Subject: vme: Free DMA resource allocation structure X-Git-Tag: firefly_0821_release~176^2~5844^2~52 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=fd5c25614012ccad75ef505982af4d6c08d0df83;p=firefly-linux-kernel-4.4.55.git vme: Free DMA resource allocation structure 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 Signed-off-by: Martyn Welch Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/vme/vme.c b/drivers/vme/vme.c index 5e6c7d74e19f..f6856b427496 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);