gralloc: Default to an error value for mapFrameBuffer
We do further operations in fb_device_open based on the result of mapFrameBuffer. However, if mapFrameBuffer is never done, we could end up with a random crash when using the info values in fb_device_open. Defaulting to an error value avoids this. Change-Id: I1e51f814611a3f2eb73f36d75e14d8725ca98474
This commit is contained in:
@@ -336,7 +336,7 @@ int mapFrameBufferLocked(struct private_module_t* module)
|
||||
|
||||
static int mapFrameBuffer(struct private_module_t* module)
|
||||
{
|
||||
int err = 0;
|
||||
int err = -1;
|
||||
char property[PROPERTY_VALUE_MAX];
|
||||
if((property_get("debug.gralloc.map_fb_memory", property, NULL) > 0) &&
|
||||
(!strncmp(property, "1", PROPERTY_VALUE_MAX ) ||
|
||||
|
||||
Reference in New Issue
Block a user