Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1664308 > unrolled thread
| Started by | Eric Anholt <eric@anholt.net> |
|---|---|
| First post | 2017-06-13 02:20 +0200 |
| Last post | 2017-06-13 02:20 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v2] drm/vc4: Fix resource leak in 'vc4_get_hang_state_ioctl()' in error handling path Eric Anholt <eric@anholt.net> - 2017-06-13 02:20 +0200
| From | Eric Anholt <eric@anholt.net> |
|---|---|
| Date | 2017-06-13 02:20 +0200 |
| Subject | Re: [PATCH v2] drm/vc4: Fix resource leak in 'vc4_get_hang_state_ioctl()' in error handling path |
| Message-ID | <tRHIR-LU-11@gated-at.bofh.it> |
[Multipart message — attachments visible in raw view] — view raw
Christophe JAILLET <christophe.jaillet@wanadoo.fr> 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!
Back to top | Article view | linux.kernel
csiph-web