mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 16:21:17 +00:00
camerabin2: Initialize camerabin2 preview pipeline data with 0
Use g_new0 to initialize all fields with 0 to only cleanup what has been initialized. This makes cleanup work correctly when some initialization fails and pointers are left in some inconsistent state.
This commit is contained in:
parent
24241b809e
commit
21653a793a
1 changed files with 1 additions and 1 deletions
|
@ -131,7 +131,7 @@ gst_camerabin_create_preview_pipeline (GstElement * element,
|
|||
GstBus *bus;
|
||||
GstAppSinkCallbacks callbacks = { 0, };
|
||||
|
||||
data = g_new (GstCameraBinPreviewPipelineData, 1);
|
||||
data = g_new0 (GstCameraBinPreviewPipelineData, 1);
|
||||
|
||||
data->pipeline = gst_pipeline_new ("preview-pipeline");
|
||||
data->appsrc = gst_element_factory_make ("appsrc", "preview-appsrc");
|
||||
|
|
Loading…
Reference in a new issue