summaryrefslogtreecommitdiffstats
path: root/ppapi
diff options
context:
space:
mode:
Diffstat (limited to 'ppapi')
-rw-r--r--ppapi/native_client/src/shared/ppapi_proxy/browser_ppb_graphics_3d_rpc_server.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/ppapi/native_client/src/shared/ppapi_proxy/browser_ppb_graphics_3d_rpc_server.cc b/ppapi/native_client/src/shared/ppapi_proxy/browser_ppb_graphics_3d_rpc_server.cc
index ba4d789..92648c3 100644
--- a/ppapi/native_client/src/shared/ppapi_proxy/browser_ppb_graphics_3d_rpc_server.cc
+++ b/ppapi/native_client/src/shared/ppapi_proxy/browser_ppb_graphics_3d_rpc_server.cc
@@ -387,7 +387,9 @@ void PpbGraphics3DRpcServer::PPB_Graphics3DTrusted_GetTransferBuffer(
GetTransferBuffer(resource_id, id, &native_handle, &native_size);
desc_wrapper.reset(factory.ImportShmHandle(
(NaClHandle)native_handle, native_size));
- *shm_desc = desc_wrapper->desc();
+ // todo(nfullagar): Dup the handle instead of leak caused by bumping the ref.
+ // bug: https://chromiumcodereview.appspot.com/9610008
+ *shm_desc = NaClDescRef(desc_wrapper->desc());
*shm_size = native_size;
rpc->result = NACL_SRPC_RESULT_OK;