glmixer: Possible null pointer dereference

While printing error message when context fails, error variable is not being used anymore
so it will lead to null pointer dereference

https://bugzilla.gnome.org/show_bug.cgi?id=748287
This commit is contained in:
Vineeth T M 2015-04-22 18:54:45 +09:00 committed by Tim-Philipp Müller
parent 7ec1246730
commit 41af2f4ad8

View file

@ -502,7 +502,6 @@ gst_gl_mixer_decide_allocation (GstGLBaseMixer * base_mix, GstQuery * query)
GstCaps *caps;
guint min, max, size;
gboolean update_pool;
GError *error = NULL;
guint out_width, out_height;
out_width = GST_VIDEO_INFO_WIDTH (&vagg->info);
@ -566,8 +565,7 @@ gst_gl_mixer_decide_allocation (GstGLBaseMixer * base_mix, GstQuery * query)
context_error:
{
GST_ELEMENT_ERROR (mix, RESOURCE, NOT_FOUND, ("%s", error->message),
(NULL));
GST_ELEMENT_ERROR (mix, RESOURCE, NOT_FOUND, ("Context error"), (NULL));
return FALSE;
}
}