diff options
author | Greg Hackmann <ghackmann@google.com> | 2014-04-02 11:52:10 -0700 |
---|---|---|
committer | Greg Hackmann <ghackmann@google.com> | 2014-04-03 09:43:48 -0700 |
commit | 4d9f47b60ba64b6edf51c66e1602ec0ded1a3de9 (patch) | |
tree | 1b174bf3c952e213513090a8cc149cc85fcbb48c /include | |
parent | d4a7a2944b29e3338fd40d6f5cc2e1d6d4328888 (diff) | |
download | exynos5-4d9f47b60ba64b6edf51c66e1602ec0ded1a3de9.tar.gz |
gralloc: refcount private_module_t
gralloc_open() can be called multiple times in the same process, which
led to the existing ion fd leaking on each open; the surviving fd also
leaked on close. Refcount the private_module_t to prevent this.
Bug: 13633155
Change-Id: I09ac8096fe0101b91b23e7c8d2ee9e11efe29b03
Signed-off-by: Greg Hackmann <ghackmann@google.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/gralloc_priv.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/gralloc_priv.h b/include/gralloc_priv.h index bce84e4..416101c 100644 --- a/include/gralloc_priv.h +++ b/include/gralloc_priv.h @@ -43,6 +43,7 @@ struct private_module_t { uint32_t numBuffers; uint32_t bufferMask; pthread_mutex_t lock; + unsigned int refcount; buffer_handle_t currentBuffer; int ionfd; |