mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-29 19:50:40 +00:00
validate: don't leak not maching config structures
Reviewers: thiblahute Differential Revision: http://phabricator.freedesktop.org/D158
This commit is contained in:
parent
c2fef15266
commit
596daaed74
1 changed files with 7 additions and 2 deletions
|
@ -99,10 +99,15 @@ create_config (const gchar * path, const gchar * suffix)
|
|||
structures = gst_validate_utils_structs_parse_from_filename (path);
|
||||
|
||||
for (tmp = structures; tmp; tmp = tmp->next) {
|
||||
if (gst_structure_has_name (tmp->data, suffix))
|
||||
result = g_list_append (result, tmp->data);
|
||||
GstStructure *structure = tmp->data;
|
||||
|
||||
if (gst_structure_has_name (structure, suffix))
|
||||
result = g_list_append (result, structure);
|
||||
else
|
||||
gst_structure_free (structure);
|
||||
}
|
||||
|
||||
g_list_free (structures);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue