<div dir="ltr">Ping.</div><div class="gmail_extra"><br><div class="gmail_quote">2016-12-29 16:41 GMT+08:00 Li Qiang <span dir="ltr"><<a href="mailto:liq3ea@gmail.com" target="_blank">liq3ea@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">There will be a crash if the guest destroy context 0. As the context 0 is<br>
allocate in renderer init, not destroy in vrend_renderer_context_<wbr>destroy.<br>
The context will be freed in renderer fini.<br>
<br>
Signed-off-by: Li Qiang <<a href="mailto:liq3ea@gmail.com">liq3ea@gmail.com</a>><br>
---<br>
src/vrend_decode.c | 4 ++++<br>
1 file changed, 4 insertions(+)<br>
<br>
diff --git a/src/vrend_decode.c b/src/vrend_decode.c<br>
index 09f08ae..1bbcfda 100644<br>
--- a/src/vrend_decode.c<br>
+++ b/src/vrend_decode.c<br>
@@ -1089,6 +1089,10 @@ void vrend_renderer_context_<wbr>destroy(uint32_t handle)<br>
if (handle >= VREND_MAX_CTX)<br>
return;<br>
<br>
+ /* never destroy context 0 */<br>
+ if (handle == 0)<br>
+ return;<br>
+<br>
ctx = dec_ctx[handle];<br>
if (!ctx)<br>
return;<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.7.4<br>
<br>
</font></span></blockquote></div><br></div>