projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
86f7114
)
MLK-12092: mxc_edid: Free mode buffer before function return
author
Sandor Yu
<Sandor.yu@nxp.com>
Mon, 28 Dec 2015 09:45:16 +0000
(17:45 +0800)
committer
Nitin Garg
<nitin.garg@nxp.com>
Mon, 19 Mar 2018 19:49:37 +0000
(14:49 -0500)
Free mode buffer before function return to avoid memory leak.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
drivers/video/fbdev/mxc/mxc_edid.c
patch
|
blob
|
history
diff --git
a/drivers/video/fbdev/mxc/mxc_edid.c
b/drivers/video/fbdev/mxc/mxc_edid.c
index
998b2d4
..
23110ce
100644
(file)
--- a/
drivers/video/fbdev/mxc/mxc_edid.c
+++ b/
drivers/video/fbdev/mxc/mxc_edid.c
@@
-578,8
+578,10
@@
int mxc_edid_parse_ext_blk(unsigned char *edid,
m = kmalloc((num + specs->modedb_len) *
sizeof(struct fb_videomode), GFP_KERNEL);
- if (!m)
+ if (!m) {
+ kfree(mode);
return 0;
+ }
if (specs->modedb_len) {
memmove(m, specs->modedb,