diff options
author | Cong Wang <[email protected]> | 2019-12-26 22:32:04 -0800 |
---|---|---|
committer | Sumit Semwal <[email protected]> | 2020-02-27 18:01:58 +0530 |
commit | d1f37226431f5d9657aa144a40f2383adbcf27e1 (patch) | |
tree | 6920ab50b7225b80c8631c67eae8e093b7a71031 | |
parent | 2be30d34a387b8d97cc1b4be1223bfe0b75a0812 (diff) |
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: bb2bb9030425 ("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]
-rw-r--r-- | drivers/dma-buf/dma-buf.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c index d4097856c86b..c343c7c10b4c 100644 --- a/drivers/dma-buf/dma-buf.c +++ b/drivers/dma-buf/dma-buf.c @@ -108,6 +108,7 @@ static int dma_buf_release(struct inode *inode, struct file *file) dma_resv_fini(dmabuf->resv); module_put(dmabuf->owner); + kfree(dmabuf->name); kfree(dmabuf); return 0; } |