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>
2 files changed