Skip to content

Commit d1f3722

Browse files
congwangsumitsemwal
authored andcommitted
dma-buf: free dmabuf->name in dma_buf_release()
dma-buf name can be set via DMA_BUF_SET_NAME ioctl, but once set it never gets freed. Free it in dma_buf_release(). Fixes: bb2bb90 ("dma-buf: add DMA_BUF_SET_NAME ioctls") Reported-by: [email protected] Cc: Greg Hackmann <[email protected]> Cc: Chenbo Feng <[email protected]> Cc: Sumit Semwal <[email protected]> Signed-off-by: Cong Wang <[email protected]> Acked-by: Chenbo Feng <[email protected]> Signed-off-by: Sumit Semwal <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 2be30d3 commit d1f3722

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/dma-buf/dma-buf.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ static int dma_buf_release(struct inode *inode, struct file *file)
108108
dma_resv_fini(dmabuf->resv);
109109

110110
module_put(dmabuf->owner);
111+
kfree(dmabuf->name);
111112
kfree(dmabuf);
112113
return 0;
113114
}

0 commit comments

Comments
 (0)