• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-ccocoa誰得qtrubypythonwindowsphpgamebathyscapheguic翻訳omegattwitterframeworkbtronvb.net計画中(planning stage)testdomarduinodirectxpreviewerゲームエンジン

external/gbm_gralloc


Commit MetaInfo

Revisionfc7f6f28cfeca1c81c9289601f1f10c2884fe22f (tree)
Zeit2017-09-07 01:43:45
AutorRob Herring <robh@kern...>
CommiterRob Herring

Log Message

Don't close fds on imported buffers

The fds should only be closed if we allocated the handle.

Signed-off-by: Rob Herring <robh@kernel.org>

Ändern Zusammenfassung

Diff

--- a/gralloc_gbm.cpp
+++ b/gralloc_gbm.cpp
@@ -213,11 +213,6 @@ static struct gralloc_gbm_bo_t *gbm_alloc(struct gbm_device *gbm,
213213
214214 static void gbm_free(struct gralloc_gbm_bo_t *bo)
215215 {
216- struct gralloc_gbm_handle_t *handle = bo->handle;
217-
218- close(handle->prime_fd);
219- handle->prime_fd = -1;
220-
221216 gbm_bo_destroy(bo->bo);
222217 delete bo;
223218 }
@@ -433,6 +428,7 @@ static void gralloc_gbm_bo_destroy(struct gralloc_gbm_bo_t *bo)
433428 handle->data = 0;
434429 }
435430 else {
431+ native_handle_close(handle);
436432 delete handle;
437433 }
438434 }