mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-19 10:14:23 +08:00
d0b1d259a4
If one 'drm_gem_handle_create()' fails, we leak somes handles and some memory. In order to fix it: - move the 'free(bo_state)' at the end of the function so that it is also called in the eror handling path. This has the side effect to also try to free it if the first 'kcalloc' fails. This is harmless. - add a new label, err_delete_handle, in order to delete already allocated handles in error handling path - remove the now useless 'err' label The way the code is now written will also delete the handles if the 'copy_to_user()' call fails. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Eric Anholt <eric@anholt.net> Link: http://patchwork.freedesktop.org/patch/msgid/20170512123803.1886-1-christophe.jaillet@wanadoo.fr |
||
---|---|---|
.. | ||
Kconfig | ||
Makefile | ||
vc4_bo.c | ||
vc4_crtc.c | ||
vc4_debugfs.c | ||
vc4_dpi.c | ||
vc4_drv.c | ||
vc4_drv.h | ||
vc4_dsi.c | ||
vc4_fence.c | ||
vc4_gem.c | ||
vc4_hdmi.c | ||
vc4_hvs.c | ||
vc4_irq.c | ||
vc4_kms.c | ||
vc4_packet.h | ||
vc4_plane.c | ||
vc4_qpu_defines.h | ||
vc4_regs.h | ||
vc4_render_cl.c | ||
vc4_trace_points.c | ||
vc4_trace.h | ||
vc4_v3d.c | ||
vc4_validate_shaders.c | ||
vc4_validate.c | ||
vc4_vec.c |