提交 cc440114 编写于 作者: D Dan Carpenter 提交者: Florian Tobias Schandinat

fb: handle NULL pointers in framebuffer release

This function is called with a potential NULL pointer in
picolcd_init_framebuffer() and it causes a static checker warning.  This
used to handle NULL pointers when the picolcd code was written, but a
couple months later we added the "info->apertures" dereference.
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: NMarcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: NFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
上级 d85d135d
......@@ -80,6 +80,8 @@ EXPORT_SYMBOL(framebuffer_alloc);
*/
void framebuffer_release(struct fb_info *info)
{
if (!info)
return;
kfree(info->apertures);
kfree(info);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册