summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Watry <awatry@gmail.com>2013-11-15 16:07:31 -0600
committerCarl Worth <cworth@cworth.org>2014-01-02 15:57:41 -0800
commit7a7166f8320447a0455997aa921869ee4b3ee4ea (patch)
tree5da84ad986f30f0451e28424a33029fe4e4337d1
parenta4a2f239d7aef09f466927cd506019a14348f256 (diff)
st/vdpau: Destroy context when initialization fails
Prevents a potential memory leak found when tracking down something else. Reviewed-by: Christian K├Ânig <christian.koenig@amd.com> Reviewed-by: Tom Stellard <thomas.stellard@amd.com> CC: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 20446d0e535c0735489c8944e8d767e0fc74fc6e)
-rw-r--r--src/gallium/state_trackers/vdpau/device.c1
1 files changed, 1 insertions, 0 deletions
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);