From 20446d0e535c0735489c8944e8d767e0fc74fc6e Mon Sep 17 00:00:00 2001 From: Aaron Watry Date: Fri, 15 Nov 2013 16:07:31 -0600 Subject: [PATCH] st/vdpau: Destroy context when initialization fails MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Prevents a potential memory leak found when tracking down something else. Reviewed-by: Christian König Reviewed-by: Tom Stellard CC: "10.0" --- 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 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); -- 2.30.2