v4l2pool: Fix leak of config structure in error case

CIDs 1212167 and  1212167
This commit is contained in:
Nicolas Dufresne 2014-05-09 11:56:52 -04:00
parent 68953d8026
commit 16f0c253a3

View file

@ -762,6 +762,7 @@ gst_v4l2_buffer_pool_start (GstBufferPool * bpool)
wrong_config:
{
GST_ERROR_OBJECT (pool, "invalid config %" GST_PTR_FORMAT, config);
gst_structure_free (config);
return FALSE;
}
no_buffers:
@ -769,6 +770,7 @@ no_buffers:
GST_ERROR_OBJECT (pool,
"we received %d buffer from device '%s', we want at least %d",
num_buffers, obj->videodev, GST_V4L2_MIN_BUFFERS);
gst_structure_free (config);
return FALSE;
}
start_failed: