summaryrefslogtreecommitdiff
path: root/va
diff options
context:
space:
mode:
authorXiang, Haihao <haihao.xiang@intel.com>2013-07-18 13:13:31 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2014-06-26 22:05:32 +0800
commitc61d8c6ce9ffc27320e9e177c1e1123d5f1b5014 (patch)
treeb5b705ba7f3222ea0db5393eebdee95b5ebd862b /va
parentce3315accf067115fbe22a13bf8689bab01da778 (diff)
downloadlibva-c61d8c6ce9ffc27320e9e177c1e1123d5f1b5014.tar.gz
va: release VADisplayContext at the end of vaTerminate()
Otherwise it will result in invalid reading in va_TraceEnd() Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com> (cherry picked from commit d4988142a3f2256e38c5c5cdcdfc1b4f5f3c1ea9) Tested-by: Daniel Charles <daniel.charles@intel.com> on ChromiumOS
Diffstat (limited to 'va')
-rw-r--r--va/va.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/va/va.c b/va/va.c
index c770f0d..4f3be28 100644
--- a/va/va.c
+++ b/va/va.c
@@ -515,15 +515,15 @@ VAStatus vaTerminate (
free(old_ctx->vtable_vpp);
old_ctx->vtable_vpp = NULL;
- if (VA_STATUS_SUCCESS == vaStatus)
- pDisplayContext->vaDestroy(pDisplayContext);
-
VA_TRACE_LOG(va_TraceTerminate, dpy);
va_TraceEnd(dpy);
va_FoolEnd(dpy);
+ if (VA_STATUS_SUCCESS == vaStatus)
+ pDisplayContext->vaDestroy(pDisplayContext);
+
return vaStatus;
}