summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Pfetsch <spfetsch@google.com>2020-09-28 13:16:01 -0700
committerSteve Pfetsch <spfetsch@google.com>2020-09-28 22:33:25 +0000
commitd29ad7ab0f865b36d915303f03c75130a7c46694 (patch)
tree06ee161d461d8afef17d99dab3e747804b916310
parentdc9662a7ce0db7a9e1f8884008f9968e7f825ff1 (diff)
downloadfts_touch-d29ad7ab0f865b36d915303f03c75130a7c46694.tar.gz
input: touchscreen: stm: fix memory leak
Free memory allocated by calls to getMSFrame3 and getSSFrame3. Bug: 169240052 Signed-off-by: Steve Pfetsch <spfetsch@google.com> Change-Id: I204502f08e702417b8879430bd6c414aef2275f5
-rw-r--r--fts.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fts.c b/fts.c
index a601334..9d77879 100644
--- a/fts.c
+++ b/fts.c
@@ -4185,6 +4185,7 @@ static void fts_populate_mutual_channel(struct fts_ts_info *info,
}
}
}
+ kfree(ms_frame.node_data);
}
static void fts_populate_self_channel(struct fts_ts_info *info,
@@ -4225,6 +4226,8 @@ static void fts_populate_self_channel(struct fts_ts_info *info,
memcpy(&self_strength->data[2 * self_strength->tx_size],
ss_frame.sense_data, 2 * self_strength->rx_size);
}
+ kfree(ss_frame.force_data);
+ kfree(ss_frame.sense_data);
}
static void fts_populate_frame(struct fts_ts_info *info,