msm: mdss: Fix memory leak in panel_debugfs_create_array func
Fix the potential memory leak in panel_debugfs_create_array func by freeing the allocated memory in error return case. CRs-Fixed: 1005536 Change-Id: If2bf7dbe7caedfa42337639fea739974f99960b4 Signed-off-by: Ping Li <pingli@codeaurora.org>
This commit is contained in:
parent
2e910fa338
commit
f51d4f2a58
1 changed files with 1 additions and 0 deletions
|
@ -228,6 +228,7 @@ struct dentry *panel_debugfs_create_array(const char *name, umode_t mode,
|
||||||
(size != sizeof(u16)) &&
|
(size != sizeof(u16)) &&
|
||||||
(size != sizeof(u32))) {
|
(size != sizeof(u32))) {
|
||||||
pr_warn("Value size %zu bytes is not supported\n", size);
|
pr_warn("Value size %zu bytes is not supported\n", size);
|
||||||
|
kfree(data);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue