mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +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;
|
||||
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;
|
||||
/* close the device */
|
||||
if (!gst_v4l2_object_stop (v4l2sink->v4l2object))
|
||||
|
|
Loading…
Reference in a new issue