mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 01:32:21 +02:00
fbdev: uvesafb: fix potential memory leak in uvesafb_probe()
Due to an incorrect goto label, memory allocated for modedb and modelist
in uvesafb_vbe_init() is not freed in some error paths. Fix this by
updating the goto label.
Fixes: 8bdb3a2d7d ("uvesafb: the driver core")
Cc: stable@vger.kernel.org
Signed-off-by: Abdun Nihaal <nihaal@cse.iitm.ac.in>
Signed-off-by: Helge Deller <deller@gmx.de>
This commit is contained in:
parent
7a35ec619d
commit
033e56fed0
|
|
@ -1694,14 +1694,14 @@ static int uvesafb_probe(struct platform_device *dev)
|
|||
i = uvesafb_vbe_init_mode(info);
|
||||
if (i < 0) {
|
||||
err = -EINVAL;
|
||||
goto out;
|
||||
goto out_mode;
|
||||
} else {
|
||||
mode = &par->vbe_modes[i];
|
||||
}
|
||||
|
||||
if (fb_alloc_cmap(&info->cmap, 256, 0) < 0) {
|
||||
err = -ENXIO;
|
||||
goto out;
|
||||
goto out_mode;
|
||||
}
|
||||
|
||||
uvesafb_init_info(info, mode);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user