diff options
author | nith1989 <tianhao.ni@samsung.com> | 2021-03-18 14:57:08 +0800 |
---|---|---|
committer | Xuelian Bai <xuelian.bai@samsung.com> | 2024-01-18 09:31:55 +0800 |
commit | 8a981d6bcf672c85d4f0bc6bb4aef50b584ed32d (patch) | |
tree | 1663cfb6eeafb267c674a3926f7881e962905fda | |
parent | ebb5c68d636a1aff7c8aef7a9b9ce140d6ba18ad (diff) | |
download | mesa-8a981d6bcf672c85d4f0bc6bb4aef50b584ed32d.tar.gz mesa-8a981d6bcf672c85d4f0bc6bb4aef50b584ed32d.tar.bz2 mesa-8a981d6bcf672c85d4f0bc6bb4aef50b584ed32d.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 1fa7295b326..90f4719eed3 100644 --- a/src/gallium/drivers/v3d/v3d_context.c +++ b/src/gallium/drivers/v3d/v3d_context.c @@ -292,6 +292,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); } |