diff --git a/ChangeLog b/ChangeLog index 76acd321df..bfa1210021 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-08-11 Steve Lhomme + + * gst/gstvalue.c: + fix a possible memory leak under Windows + 2004-08-11 Steve Lhomme * win32/GStreamer.vcproj: diff --git a/gst/gstvalue.c b/gst/gstvalue.c index dccf9be9a1..4efe859843 100644 --- a/gst/gstvalue.c +++ b/gst/gstvalue.c @@ -870,7 +870,7 @@ gst_value_serialize_buffer (const GValue * value) data = GST_BUFFER_DATA (buffer); size = GST_BUFFER_SIZE (buffer); - string = malloc (size * 2 + 1); + string = g_malloc (size * 2 + 1); for (i = 0; i < size; i++) { sprintf (string + i * 2, "%02x", data[i]); } @@ -2523,7 +2523,7 @@ gst_value_deserialize_fraction (GValue * dest, const char *s) return FALSE; tmp = g_strndup (s, (size_t) (div - s)); num = atoi (tmp); - free (tmp); + g_free (tmp); den = atoi (div + 1); gst_value_set_fraction (dest, num, den);