Default to NONE format in Layer
mFormat is not initialized with any value in Layer constructor, causing
a call to requestFormat() with no explicit format specified to fallback to
some uninitialized value. Such invalid path actually detected by valgrind.
Change-Id: Ib7faabcd61eaa26fb0ae7a9a486d9e258ba31b63
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index 57af001..bf1e9aa 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -60,7 +60,8 @@
mProtectedByDRM(false),
mTextureManager(),
mBufferManager(mTextureManager),
- mWidth(0), mHeight(0), mNeedsScaling(false), mFixedSize(false)
+ mWidth(0), mHeight(0), mFormat(PIXEL_FORMAT_NONE),
+ mNeedsScaling(false), mFixedSize(false)
{
}