Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3a0ee2ce authored by Yoichi Yuasa's avatar Yoichi Yuasa Committed by Linus Torvalds
Browse files

[PATCH] fix memory leak in dma_declare_coherent_memory()



When it goes to free1_out, dev->dma_mem has not been freed.

Signed-off-by: default avatarYoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 17f0cd2f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -111,7 +111,7 @@ int dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr,
	return DMA_MEMORY_IO;

 free1_out:
	kfree(dev->dma_mem->bitmap);
	kfree(dev->dma_mem);
 out:
	return 0;
}
+1 −1
Original line number Diff line number Diff line
@@ -110,7 +110,7 @@ int dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr,
	return DMA_MEMORY_IO;

 free1_out:
	kfree(dev->dma_mem->bitmap);
	kfree(dev->dma_mem);
 out:
	if (mem_base)
		iounmap(mem_base);