mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-19 18:24:14 +08:00
drm/ast: free correct pointer in astfb_create() error paths
In the err_free_vram and err_release_fbi error paths in astfb_create(), we attempt to free afbdev->sysram. The only jumps to these error paths occur before we assign afbdev->sysram = sysram. Free sysram instead. Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20161114030359.27852-1-andrew.donnellan@au1.ibm.com
This commit is contained in:
parent
dfeb693d5a
commit
554dd692af
@ -253,7 +253,7 @@ static int astfb_create(struct drm_fb_helper *helper,
|
||||
err_release_fbi:
|
||||
drm_fb_helper_release_fbi(helper);
|
||||
err_free_vram:
|
||||
vfree(afbdev->sysram);
|
||||
vfree(sysram);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user