[vlc-commits] gl: vaapi: fix possible segfault in error path
Thomas Guillem
git at videolan.org
Wed Jul 5 15:17:18 CEST 2017
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Jul 5 15:16:24 2017 +0200| [95a24da76c241833c0981d97d896ef6270f75606] | committer: Thomas Guillem
gl: vaapi: fix possible segfault in error path
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=95a24da76c241833c0981d97d896ef6270f75606
---
modules/video_output/opengl/converter_vaapi.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/modules/video_output/opengl/converter_vaapi.c b/modules/video_output/opengl/converter_vaapi.c
index 96d8f969c4..674e3cdf55 100644
--- a/modules/video_output/opengl/converter_vaapi.c
+++ b/modules/video_output/opengl/converter_vaapi.c
@@ -340,7 +340,7 @@ tc_vaegl_init(opengl_tex_converter_t *tc, VADisplay *vadpy,
return VLC_SUCCESS;
error:
- if (priv->vainst)
+ if (priv && priv->vainst)
vlc_vaapi_ReleaseInstance(priv->vainst);
else
{
@@ -349,10 +349,11 @@ error:
if (native != NULL && native_destroy_cb != NULL)
native_destroy_cb(native);
}
- if (tc->priv)
- free(tc->priv);
+ if (priv)
+ free(priv);
return ret;
}
+
#ifdef HAVE_VA_X11
static void
x11_native_destroy_cb(VANativeDisplay native)
More information about the vlc-commits
mailing list