OSDN Git Service
(root)
/
android-x86
/
external-gbm_gralloc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5fbb4a8
)
Don't close fds on imported buffers
author
Rob Herring
<robh@kernel.org>
Thu, 24 Aug 2017 14:38:25 +0000
(09:38 -0500)
committer
Rob Herring
<robh@kernel.org>
Wed, 6 Sep 2017 16:43:45 +0000
(11:43 -0500)
The fds should only be closed if we allocated the handle.
Signed-off-by: Rob Herring <robh@kernel.org>
gralloc_gbm.cpp
patch
|
blob
|
history
diff --git
a/gralloc_gbm.cpp
b/gralloc_gbm.cpp
index
8a30e70
..
a403e99
100644
(file)
--- a/
gralloc_gbm.cpp
+++ b/
gralloc_gbm.cpp
@@
-213,11
+213,6
@@
static struct gralloc_gbm_bo_t *gbm_alloc(struct gbm_device *gbm,
static void gbm_free(struct gralloc_gbm_bo_t *bo)
{
- struct gralloc_gbm_handle_t *handle = bo->handle;
-
- close(handle->prime_fd);
- handle->prime_fd = -1;
-
gbm_bo_destroy(bo->bo);
delete bo;
}
@@
-433,6
+428,7
@@
static void gralloc_gbm_bo_destroy(struct gralloc_gbm_bo_t *bo)
handle->data = 0;
}
else {
+ native_handle_close(handle);
delete handle;
}
}