Fix bug in gralloc
authorRebecca Schultz Zavin <rebecca@android.com>
Thu, 4 Oct 2012 18:23:56 +0000 (11:23 -0700)
committerRebecca Schultz Zavin <rebecca@android.com>
Thu, 4 Oct 2012 18:25:26 +0000 (11:25 -0700)
commit5258c21c1bdeb412c4ad7982d95e587a121f00fc
treeb2ae8c9e6ced0d5bd0ea62be0a10b5e65ad25e50
parentfdf73d2f9ff2aad79d827b95f99f57538d7fde3d
Fix bug in gralloc

If buffers were allocated and then locked without ever
being passed to another process lock would return NULL
instead of a pointer to the buffer.  Instead map the buffer
from lock if it hasn't already been done by register.  Also
check in free and unmap the buffer it is mapped.

Change-Id: I3fe670ccb429f3de5f2e4dd07768414e70a02036
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
gralloc/gralloc.cpp
gralloc/mapper.cpp