diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2020-05-06 20:19:02 +0200 |
---|---|---|
committer | Sam Ravnborg <sam@ravnborg.org> | 2020-05-06 20:22:25 +0200 |
commit | 18722d48a6bb9c2e8d046214c0a5fd19d0a7c9f6 (patch) | |
tree | 647206bfdb3215f21be71722a7c4dfbcf6dc45c8 /drivers/gpu/drm | |
parent | fbdev: aty: use true, false for bool variables in atyfb_base.c (diff) | |
download | linux-18722d48a6bb9c2e8d046214c0a5fd19d0a7c9f6.tar.xz linux-18722d48a6bb9c2e8d046214c0a5fd19d0a7c9f6.zip |
video: fbdev: w100fb: Fix a potential double free.
Some memory is vmalloc'ed in the 'w100fb_save_vidmem' function and freed in
the 'w100fb_restore_vidmem' function. (these functions are called
respectively from the 'suspend' and the 'resume' functions)
However, it is also freed in the 'remove' function.
In order to avoid a potential double free, set the corresponding pointer
to NULL once freed in the 'w100fb_restore_vidmem' function.
Fixes: aac51f09d96a ("[PATCH] w100fb: Rewrite for platform independence")
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Antonino Daplas <adaplas@pol.net>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: <stable@vger.kernel.org> # v2.6.14+
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20200506181902.193290-1-christophe.jaillet@wanadoo.fr
Diffstat (limited to 'drivers/gpu/drm')
0 files changed, 0 insertions, 0 deletions