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

Aaron Watry awatry at gmail.com
Tue Dec 17 14:34:40 PST 2013


Prevents a potential memory leak found when tracking down something else.

Reviewed-by: Christian König <christian.koenig at amd.com>
Reviewed-by: Tom Stellard <thomas.stellard at amd.com>

CC: "10.0" <mesa-stable at lists.freedesktop.org>
---
 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);
-- 
1.8.3.2



More information about the mesa-stable mailing list