From: Aaron Watry Date: Fri, 15 Nov 2013 22:07:31 +0000 (-0600) Subject: st/vdpau: Destroy context when initialization fails X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=20446d0e535c0735489c8944e8d767e0fc74fc6e;p=mesa.git st/vdpau: Destroy context when initialization fails Prevents a potential memory leak found when tracking down something else. Reviewed-by: Christian König Reviewed-by: Tom Stellard CC: "10.0" --- diff --git a/src/gallium/state_trackers/vdpau/device.c b/src/gallium/state_trackers/vdpau/device.c index 309fee4afae..fb9c68c26e0 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);