summaryrefslogtreecommitdiffstats
path: root/drivers/vme
diff options
context:
space:
mode:
authorMartyn Welch <martyn.welch@ge.com>2013-06-06 13:29:16 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-06-06 21:54:08 +0200
commitfd5c25614012ccad75ef505982af4d6c08d0df83 (patch)
tree8a45e79e426b33991f58df71a60c56bb05598385 /drivers/vme
parentdrivers: char: mem: use IS_ERR_VALUE() in memory_lseek() (diff)
downloadlinux-fd5c25614012ccad75ef505982af4d6c08d0df83.tar.xz
linux-fd5c25614012ccad75ef505982af4d6c08d0df83.zip
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 <steven.deroo@arcelormittal.com> Signed-off-by: Martyn Welch <martyn.welch@ge.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/vme')
-rw-r--r--drivers/vme/vme.c2
1 files changed, 2 insertions, 0 deletions
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);