From 6730b41a8c1e7ba6a8230db329d134af1aa97b10 Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Wed, 11 Aug 2004 18:56:39 +0000 Subject: [PATCH] fix a possible memory leak under Windows Original commit message from CVS: fix a possible memory leak under Windows --- ChangeLog | 5 +++++ gst/gstvalue.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) 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);