summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiang, Haihao <haihao.xiang@intel.com>2013-07-18 13:13:31 +0800
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>2013-08-27 11:16:45 +0200
commit3b3eaba185962016395e54adeac50196d7411b78 (patch)
tree9f97eeddae97988ab25ba281a67d1665383cdba7
parent58e293757ccebdb7a65fff768cddeb30a88fdeb0 (diff)
downloadlibva-3b3eaba185962016395e54adeac50196d7411b78.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>
-rw-r--r--va/va.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/va/va.c b/va/va.c
index ae853bb..4ad7290 100644
--- a/va/va.c
+++ b/va/va.c
@@ -514,15 +514,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;
}