misc: fastrpc: prevent memory leak in fastrpc_dma_buf_attach
Subsystems (2)
PATCH 1/1 misc: fastrpc: prevent memory leak in fastrpc_dma_buf_attach
In fastrpc_dma_buf_attach if dma_get_sgtable fails the allocated memory for a should be released.
Signed-off-by Navid Emamdoost <[email protected]>
--- drivers/misc/fastrpc.c | 1 + 1 file changed, 1 insertion(+)
drivers/misc/fastrpc.c +1 -0
@@ -527,6 +527,7 @@ static int fastrpc_dma_buf_attach(struct dma_buf *dmabuf, FASTRPC_PHYS(buffer->phys), buffer->size);if (ret <0 ) {dev_err (buffer->dev,"failed to get scatterlist from DMA API\n" ); +kfree (a);return -EINVAL ; }
Signature · 1 line
2.17.1