Commit 16f0c253 authored by Nicolas Dufresne's avatar Nicolas Dufresne
Browse files

v4l2pool: Fix leak of config structure in error case

CIDs 1212167 and  1212167
parent 68953d80
...@@ -762,6 +762,7 @@ gst_v4l2_buffer_pool_start (GstBufferPool * bpool) ...@@ -762,6 +762,7 @@ gst_v4l2_buffer_pool_start (GstBufferPool * bpool)
wrong_config: wrong_config:
{ {
GST_ERROR_OBJECT (pool, "invalid config %" GST_PTR_FORMAT, config); GST_ERROR_OBJECT (pool, "invalid config %" GST_PTR_FORMAT, config);
gst_structure_free (config);
return FALSE; return FALSE;
} }
no_buffers: no_buffers:
...@@ -769,6 +770,7 @@ no_buffers: ...@@ -769,6 +770,7 @@ no_buffers:
GST_ERROR_OBJECT (pool, GST_ERROR_OBJECT (pool,
"we received %d buffer from device '%s', we want at least %d", "we received %d buffer from device '%s', we want at least %d",
num_buffers, obj->videodev, GST_V4L2_MIN_BUFFERS); num_buffers, obj->videodev, GST_V4L2_MIN_BUFFERS);
gst_structure_free (config);
return FALSE; return FALSE;
} }
start_failed: start_failed:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment