Re: [PATCH v2] drm/vc4: Fix resource leak in 'vc4_get_hang_state_ioctl()' in error handling path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Christophe JAILLET <christophe.jaillet@xxxxxxxxxx> writes:

> 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

Reviewed and applied.  Thanks!

Attachment: signature.asc
Description: PGP signature

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux