[Mesa-dev] [PATCH 7/8] st/vdpau: Destroy context when initialization fails

Christian König deathsimple at vodafone.de
Fri Dec 13 00:57:14 PST 2013


Am 12.12.2013 23:47, schrieb Aaron Watry:
> Prevents a potential memory leak found when tracking down something else.

Patch is : Reviewed-by: Christian König <christian.koenig at amd.com>

> ---
>   src/gallium/state_trackers/vdpau/device.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/src/gallium/state_trackers/vdpau/device.c b/src/gallium/state_trackers/vdpau/device.c
> index 309fee4..fb9c68c 100644
> --- a/src/gallium/state_trackers/vdpau/device.c
> +++ b/src/gallium/state_trackers/vdpau/device.c
> @@ -86,6 +86,7 @@ vdp_imp_device_create_x11(Display *display, int screen, VdpDevice *device,
>      return VDP_STATUS_OK;
>   
>   no_handle:
> +   dev->context->destroy(dev->context);
>      /* Destroy vscreen */
>   no_context:
>      vl_screen_destroy(dev->vscreen);



More information about the mesa-dev mailing list