mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-29 19:50:40 +00:00
validate-utils: Add NULL check
Unlikely to be triggered. And fix typo at the same time CID #1415464
This commit is contained in:
parent
c8cd695bb9
commit
5b54127c5a
1 changed files with 7 additions and 5 deletions
|
@ -583,11 +583,14 @@ _get_lines (const gchar * scenario_file)
|
|||
|
||||
/* Returns: (transfer full): a #GList of #GstStructure */
|
||||
static GList *
|
||||
_lines_get_strutures (gchar ** lines)
|
||||
_lines_get_structures (gchar ** lines)
|
||||
{
|
||||
gint i;
|
||||
GList *structures = NULL;
|
||||
|
||||
if (lines == NULL)
|
||||
return NULL;
|
||||
|
||||
for (i = 0; lines[i]; i++) {
|
||||
GstStructure *structure;
|
||||
|
||||
|
@ -604,8 +607,7 @@ _lines_get_strutures (gchar ** lines)
|
|||
}
|
||||
|
||||
done:
|
||||
if (lines)
|
||||
g_strfreev (lines);
|
||||
g_strfreev (lines);
|
||||
|
||||
return structures;
|
||||
|
||||
|
@ -632,7 +634,7 @@ gst_validate_utils_structs_parse_from_filename (const gchar * scenario_file)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
return _lines_get_strutures (lines);
|
||||
return _lines_get_structures (lines);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -648,7 +650,7 @@ gst_validate_structs_parse_from_gfile (GFile * scenario_file)
|
|||
if (lines == NULL)
|
||||
return NULL;
|
||||
|
||||
return _lines_get_strutures (lines);
|
||||
return _lines_get_structures (lines);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
Loading…
Reference in a new issue