mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-21 05:26:23 +00:00
validate: Plug minor leak in issue creation error path
CID 1415494
This commit is contained in:
parent
54e35bb082
commit
fc49d18425
1 changed files with 7 additions and 2 deletions
|
@ -157,8 +157,13 @@ gst_validate_issue_new (GstValidateIssueId issue_id, const gchar * summary,
|
|||
GstValidateIssue *issue = g_slice_new (GstValidateIssue);
|
||||
gchar **area_name = g_strsplit (g_quark_to_string (issue_id), "::", 2);
|
||||
|
||||
g_return_val_if_fail (area_name[0] != NULL && area_name[1] != 0 &&
|
||||
area_name[2] == NULL, NULL);
|
||||
if (!(area_name[0] != NULL && area_name[1] != NULL && area_name[2] == NULL)) {
|
||||
g_warning ("Wrong issue ID: %s (should be in the form: area::name)",
|
||||
g_quark_to_string (issue_id));
|
||||
g_strfreev (area_name);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
issue->issue_id = issue_id;
|
||||
issue->summary = g_strdup (summary);
|
||||
|
|
Loading…
Reference in a new issue