mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
subparse: use g_strdup() and friends
Fixes build issue on windows, but is also better seeing that these string are going to get freed with g_free() and not free().
This commit is contained in:
parent
b550764da8
commit
7d16f95730
1 changed files with 3 additions and 3 deletions
|
@ -455,9 +455,9 @@ string_token (const gchar * string, const gchar * delimiter, gchar ** first)
|
|||
{
|
||||
gchar *next = strstr (string, delimiter);
|
||||
if (next) {
|
||||
*first = strndup (string, next - string);
|
||||
*first = g_strndup (string, next - string);
|
||||
} else {
|
||||
*first = strdup (string);
|
||||
*first = g_strdup (string);
|
||||
}
|
||||
return next;
|
||||
}
|
||||
|
@ -498,7 +498,7 @@ html_context_handle_element (HtmlContext * ctxt,
|
|||
|
||||
/* strip " or ' from attribute value */
|
||||
if (attr_value[0] == '"' || attr_value[0] == '\'') {
|
||||
gchar *tmp = strdup (attr_value + 1);
|
||||
gchar *tmp = g_strdup (attr_value + 1);
|
||||
g_free (attr_value);
|
||||
attr_value = tmp;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue