msm8974/hwc: Free all MdpPipeInfos on reset

The reset code was only freeing MdpPipeInfos if numLayers>0, but on
every frame it was being called with numLayers==0 and then again with
numLayers>0. Since reset also memsets the structure to zero, it was
leaking the MdpPipeInfos on every frame.

Bug: 16601370
Change-Id: I7a95bc2e533455c8a65c5a0c498b99d87c858fe0
diff --git a/msm8974/libhwcomposer/hwc_mdpcomp.cpp b/msm8974/libhwcomposer/hwc_mdpcomp.cpp
index 9f7861a..f49d67f 100644
--- a/msm8974/libhwcomposer/hwc_mdpcomp.cpp
+++ b/msm8974/libhwcomposer/hwc_mdpcomp.cpp
@@ -179,11 +179,12 @@
 }
 
 MDPComp::FrameInfo::FrameInfo() {
+    memset(&mdpToLayer, 0, sizeof(mdpToLayer));
     reset(0);
 }
 
 void MDPComp::FrameInfo::reset(const int& numLayers) {
-    for(int i = 0 ; i < MAX_PIPES_PER_MIXER && numLayers; i++ ) {
+    for(int i = 0 ; i < MAX_PIPES_PER_MIXER; i++ ) {
         if(mdpToLayer[i].pipeInfo) {
             delete mdpToLayer[i].pipeInfo;
             mdpToLayer[i].pipeInfo = NULL;