[Mesa-dev] [PATCH 7/8] st/vdpau: Destroy context when initialization fails
Aaron Watry
awatry at gmail.com
Thu Dec 12 14:47:23 PST 2013
Prevents a potential memory leak found when tracking down something else.
---
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-dev
mailing list