aboutsummaryrefslogtreecommitdiff
path: root/net/unix/sysctl_net_unix.c
diff options
context:
space:
mode:
authorChristophe JAILLET <[email protected]>2017-05-12 14:38:03 +0200
committerEric Anholt <[email protected]>2017-06-12 17:11:39 -0700
commitd0b1d259a4b58b21a21ea82d7174bf7ea825e9cc (patch)
tree478890f4ecd797fd31e89b1e8b7b66e00f3f5801 /net/unix/sysctl_net_unix.c
parent24bb206f32cdaa76c59444b62be51708dc16fbe8 (diff)
drm/vc4: Fix resource leak in 'vc4_get_hang_state_ioctl()' in error handling path
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 <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'net/unix/sysctl_net_unix.c')
0 files changed, 0 insertions, 0 deletions