public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dmaengine: pch_dma: fix memory leak on failure path in pch_dma_probe()
@ 2015-04-10 22:28 Alexey Khoroshilov
  2015-04-17 18:12 ` Vinod Koul
  0 siblings, 1 reply; 2+ messages in thread
From: Alexey Khoroshilov @ 2015-04-10 22:28 UTC (permalink / raw)
  To: Vinod Koul, Dan Williams
  Cc: Alexey Khoroshilov, dmaengine, linux-kernel, ldv-project

Memory allocated for pch_dma is not deallocated in case of failure
in pch_dma_probe().

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
---
 drivers/dma/pch_dma.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/dma/pch_dma.c b/drivers/dma/pch_dma.c
index 35c143cb88da..b859792dde95 100644
--- a/drivers/dma/pch_dma.c
+++ b/drivers/dma/pch_dma.c
@@ -949,6 +949,7 @@ err_free_res:
 err_disable_pdev:
 	pci_disable_device(pdev);
 err_free_mem:
+	kfree(pd);
 	return err;
 }
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-04-17 18:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-10 22:28 [PATCH] dmaengine: pch_dma: fix memory leak on failure path in pch_dma_probe() Alexey Khoroshilov
2015-04-17 18:12 ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox