mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
v4l2sink: Protect against NULL-pointer access
gst_v4l2sink_change_state() would free the pool without checking whether there was a valid pool...
This commit is contained in:
parent
0aace5a0f3
commit
4ba93e9f1a
1 changed files with 2 additions and 1 deletions
|
@ -461,7 +461,8 @@ gst_v4l2sink_change_state (GstElement * element, GstStateChange transition)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case GST_STATE_CHANGE_READY_TO_NULL:
|
case GST_STATE_CHANGE_READY_TO_NULL:
|
||||||
gst_v4l2_buffer_pool_destroy (v4l2sink->pool);
|
if (NULL != v4l2sink->pool)
|
||||||
|
gst_v4l2_buffer_pool_destroy (v4l2sink->pool);
|
||||||
v4l2sink->pool = NULL;
|
v4l2sink->pool = NULL;
|
||||||
/* close the device */
|
/* close the device */
|
||||||
if (!gst_v4l2_object_stop (v4l2sink->v4l2object))
|
if (!gst_v4l2_object_stop (v4l2sink->v4l2object))
|
||||||
|
|
Loading…
Reference in a new issue