From: Tim-Philipp Müller Date: Wed, 17 Jul 2013 08:04:47 +0000 (+0100) Subject: subparse: use g_strdup() and friends X-Git-Tag: 1.19.3~511^2~5179 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7d16f95730ca5de1c9b8465a3c0ac53898a4a2c4;p=platform%2Fupstream%2Fgstreamer.git 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(). --- diff --git a/gst/subparse/samiparse.c b/gst/subparse/samiparse.c index cd84fc1..973192c 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; }