omxvideodec: Don't leak buffer pool config in error cases

CID 1216158
This commit is contained in:
Sebastian Dröge 2014-05-26 11:02:10 +02:00
parent 8ebc7d2b5a
commit bf7e6109d9

View file

@ -567,11 +567,13 @@ gst_omx_video_dec_allocate_output_buffers (GstOMXVideoDec * self)
config = gst_buffer_pool_get_config (pool);
if (!gst_buffer_pool_config_get_params (config, &caps, NULL, &min, &max)) {
GST_ERROR_OBJECT (self, "Can't get buffer pool params");
gst_structure_free (config);
err = OMX_ErrorUndefined;
goto done;
}
if (!gst_buffer_pool_config_get_allocator (config, &allocator, NULL)) {
GST_ERROR_OBJECT (self, "Can't get buffer pool allocator");
gst_structure_free (config);
err = OMX_ErrorUndefined;
goto done;
}