From 31e5714e870ba77e76c9d0487a2be6f56b243af0 Mon Sep 17 00:00:00 2001 From: Naomi Luis Date: Tue, 10 Jan 2012 17:31:51 -0800 Subject: [PATCH] libgralloc: Store the correct fd when mapping the framebuffer. Store the actual and not the dup'd fd when mapping the framebuffer. Change-Id: Ibca65a8f4c4db374dc23e8fee216ec5c36a9c01c --- libgralloc/framebuffer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libgralloc/framebuffer.cpp b/libgralloc/framebuffer.cpp index 885c614..2011c1c 100644 --- a/libgralloc/framebuffer.cpp +++ b/libgralloc/framebuffer.cpp @@ -1001,7 +1001,7 @@ int mapFrameBufferLocked(struct private_module_t* module) int err; size_t fbSize = roundUpToPageSize(finfo.line_length * info.yres_virtual); - module->framebuffer = new private_handle_t(dup(fd), fbSize, + module->framebuffer = new private_handle_t(fd, fbSize, private_handle_t::PRIV_FLAGS_USES_PMEM, BUFFER_TYPE_UI, module->fbFormat, info.xres, info.yres); module->numBuffers = info.yres_virtual / info.yres;