Commit 935b3db9 authored by Haihao Xiang's avatar Haihao Xiang Committed by Tim-Philipp Müller

msdk: release resources if failing to create the buffer pool

Needn't check the pointers against NULL because the pointers are
non-NULL
parent 6d35510a
......@@ -757,11 +757,14 @@ error_no_pool:
error_no_allocator:
{
GST_INFO_OBJECT (thiz, "failed to create allocator");
gst_object_unref (pool);
return NULL;
}
error_pool_config:
{
GST_INFO_OBJECT (thiz, "failed to set config");
gst_object_unref (pool);
gst_object_unref (allocator);
return NULL;
}
}
......
......@@ -918,11 +918,14 @@ error_no_pool:
error_no_allocator:
{
GST_INFO_OBJECT (thiz, "failed to create allocator");
gst_object_unref (pool);
return FALSE;
}
error_pool_config:
{
GST_INFO_OBJECT (thiz, "failed to set config");
gst_object_unref (pool);
gst_object_unref (allocator);
return FALSE;
}
}
......
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