summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.net>2013-07-17 09:04:47 +0100
committerTim-Philipp Müller <tim@centricular.net>2013-07-17 18:47:16 +0100
commit404f80a28c420806a808d2ffacf4073411e1df7d (patch)
treec52747f032467c9fb1e91ab8c77ad5b8e54709ae
parent4aead00c3d910f3ac88b0815f1f2c2f87cda2f76 (diff)
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().
-rw-r--r--gst/subparse/samiparse.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gst/subparse/samiparse.c b/gst/subparse/samiparse.c
index a38396325..646fe99db 100644
--- a/gst/subparse/samiparse.c
+++ b/gst/subparse/samiparse.c
@@ -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;
}