diff options
author | nith1989 <tianhao.ni@samsung.com> | 2021-03-18 14:57:08 +0800 |
---|---|---|
committer | Xuelian Bai <xuelian.bai@samsung.com> | 2023-02-21 14:32:53 +0800 |
commit | 5be35a51fbe3a84c14ff1a228f73751e5c3bb28b (patch) | |
tree | 80ef2da7399d9bc995f8b2360c9e95e7153b980d | |
parent | 3fd5fe0497287f740f5f2e02cf376b0fa2a618c1 (diff) | |
download | mesa-5be35a51fbe3a84c14ff1a228f73751e5c3bb28b.tar.gz mesa-5be35a51fbe3a84c14ff1a228f73751e5c3bb28b.tar.bz2 mesa-5be35a51fbe3a84c14ff1a228f73751e5c3bb28b.zip |
Fix fence fd leak issue:
- close fence fd when destroy context
Change-Id: I4ec1fe1c2f7de3221802ea53c3e563471cd1a332
Signed-off-by: Tianhao Ni <tianhao.ni@samsung.com>
-rw-r--r-- | src/gallium/drivers/v3d/v3d_context.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/v3d/v3d_context.c b/src/gallium/drivers/v3d/v3d_context.c index edcfc9a475f..4821624635c 100644 --- a/src/gallium/drivers/v3d/v3d_context.c +++ b/src/gallium/drivers/v3d/v3d_context.c @@ -296,6 +296,13 @@ v3d_context_destroy(struct pipe_context *pctx) v3d_program_fini(pctx); + if (v3d->screen->has_syncobj) { + drmSyncobjDestroy(v3d->fd, v3d->out_sync); + drmSyncobjDestroy(v3d->fd, v3d->in_syncobj); + } + if (v3d->in_fence_fd >= 0) + close(v3d->in_fence_fd); + ralloc_free(v3d); } |