[Mesa-dev] [PATCH mesa] gbm/dri: fix memory leaks in error path

Emil Velikov emil.l.velikov at gmail.com
Fri Jan 27 16:39:34 UTC 2017


On 23 January 2017 at 12:19, Eric Engestrom <eric.engestrom at imgtec.com> wrote:
> Signed-off-by: Eric Engestrom <eric.engestrom at imgtec.com>
> ---
>  src/gbm/backends/dri/gbm_dri.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c
> index 45cb42a862..ef96185848 100644
> --- a/src/gbm/backends/dri/gbm_dri.c
> +++ b/src/gbm/backends/dri/gbm_dri.c
> @@ -715,6 +715,7 @@ gbm_dri_bo_import(struct gbm_device *gbm,
>        gbm_format = gbm_dri_to_gbm_format(dri_format);
>        if (gbm_format == 0) {
>           errno = EINVAL;
> +         dri->image->destroyImage(image);
There's another one for the GBM_BO_IMPORT_WL_BUFFER wb->format default case.
Can you please squash that one as well, please ?

FYI: I'm going through your reviewed patches and I'll commit them in a second.

Thanks
Emil


More information about the mesa-dev mailing list