mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
camerabin2: fix gvalue leak
This commit is contained in:
parent
d64e833a07
commit
9de92cf9dc
1 changed files with 4 additions and 5 deletions
|
@ -1044,7 +1044,6 @@ gst_camera_bin_handle_message (GstBin * bin, GstMessage * message)
|
|||
}
|
||||
dec_counter = TRUE;
|
||||
} else if (gst_structure_has_name (structure, "preview-image")) {
|
||||
GValue *value;
|
||||
gchar *location = NULL;
|
||||
|
||||
g_mutex_lock (camerabin->preview_list_mutex);
|
||||
|
@ -1064,11 +1063,11 @@ gst_camera_bin_handle_message (GstBin * bin, GstMessage * message)
|
|||
g_mutex_unlock (camerabin->preview_list_mutex);
|
||||
|
||||
if (location) {
|
||||
value = g_new0 (GValue, 1);
|
||||
g_value_init (value, G_TYPE_STRING);
|
||||
g_value_take_string (value, location);
|
||||
GValue value = { 0 };
|
||||
g_value_init (&value, G_TYPE_STRING);
|
||||
g_value_take_string (&value, location);
|
||||
gst_structure_take_value ((GstStructure *) structure, "location",
|
||||
value);
|
||||
&value);
|
||||
}
|
||||
|
||||
GST_LOG_OBJECT (bin, "received preview-image message");
|
||||
|
|
Loading…
Reference in a new issue