From 578f2ae6333bec7d7ec7d13d3953d6318faaf249 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 16 Nov 2005 17:35:07 +0000 Subject: [PATCH] check/Makefile.am: Enable valgrind check. Original commit message from CVS: * check/Makefile.am: Enable valgrind check. * gst/elements/gstfakesrc.c: (gst_fake_src_alloc_parent), (gst_fake_src_alloc_buffer): Fix memleak. --- ChangeLog | 9 +++++++++ check/Makefile.am | 1 - gst/elements/gstfakesrc.c | 4 ++++ plugins/elements/gstfakesrc.c | 4 ++++ tests/check/Makefile.am | 1 - 5 files changed, 17 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8800713c06..06f9702ca3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2005-11-16 Wim Taymans + + * check/Makefile.am: + Enable valgrind check. + + * gst/elements/gstfakesrc.c: (gst_fake_src_alloc_parent), + (gst_fake_src_alloc_buffer): + Fix memleak. + 2005-11-16 Wim Taymans * gst/net/gstnettimeprovider.c: (gst_net_time_provider_finalize): diff --git a/check/Makefile.am b/check/Makefile.am index e32898d60f..eade55243a 100644 --- a/check/Makefile.am +++ b/check/Makefile.am @@ -86,7 +86,6 @@ net_gstnettimeprovider_LDADD = \ # valgrind testing # these just need valgrind fixing, period VALGRIND_TO_FIX = \ - elements/fakesrc \ gst/gstevent \ gst-libs/controller \ pipelines/simple_launch_lines diff --git a/gst/elements/gstfakesrc.c b/gst/elements/gstfakesrc.c index c1a2efc6ad..b66bfaf394 100644 --- a/gst/elements/gstfakesrc.c +++ b/gst/elements/gstfakesrc.c @@ -382,6 +382,7 @@ gst_fake_src_alloc_parent (GstFakeSrc * src) buf = gst_buffer_new (); GST_BUFFER_DATA (buf) = g_malloc (src->parentsize); + GST_BUFFER_MALLOCDATA (buf) = GST_BUFFER_DATA (buf); GST_BUFFER_SIZE (buf) = src->parentsize; src->parent = buf; @@ -586,15 +587,18 @@ gst_fake_src_alloc_buffer (GstFakeSrc * src, guint size) switch (src->filltype) { case FAKE_SRC_FILLTYPE_NOTHING: GST_BUFFER_DATA (buf) = g_malloc (size); + GST_BUFFER_MALLOCDATA (buf) = GST_BUFFER_DATA (buf); break; case FAKE_SRC_FILLTYPE_NULL: GST_BUFFER_DATA (buf) = g_malloc0 (size); + GST_BUFFER_MALLOCDATA (buf) = GST_BUFFER_DATA (buf); break; case FAKE_SRC_FILLTYPE_RANDOM: case FAKE_SRC_FILLTYPE_PATTERN: case FAKE_SRC_FILLTYPE_PATTERN_CONT: default: GST_BUFFER_DATA (buf) = g_malloc (size); + GST_BUFFER_MALLOCDATA (buf) = GST_BUFFER_DATA (buf); gst_fake_src_prepare_buffer (src, buf); break; } diff --git a/plugins/elements/gstfakesrc.c b/plugins/elements/gstfakesrc.c index c1a2efc6ad..b66bfaf394 100644 --- a/plugins/elements/gstfakesrc.c +++ b/plugins/elements/gstfakesrc.c @@ -382,6 +382,7 @@ gst_fake_src_alloc_parent (GstFakeSrc * src) buf = gst_buffer_new (); GST_BUFFER_DATA (buf) = g_malloc (src->parentsize); + GST_BUFFER_MALLOCDATA (buf) = GST_BUFFER_DATA (buf); GST_BUFFER_SIZE (buf) = src->parentsize; src->parent = buf; @@ -586,15 +587,18 @@ gst_fake_src_alloc_buffer (GstFakeSrc * src, guint size) switch (src->filltype) { case FAKE_SRC_FILLTYPE_NOTHING: GST_BUFFER_DATA (buf) = g_malloc (size); + GST_BUFFER_MALLOCDATA (buf) = GST_BUFFER_DATA (buf); break; case FAKE_SRC_FILLTYPE_NULL: GST_BUFFER_DATA (buf) = g_malloc0 (size); + GST_BUFFER_MALLOCDATA (buf) = GST_BUFFER_DATA (buf); break; case FAKE_SRC_FILLTYPE_RANDOM: case FAKE_SRC_FILLTYPE_PATTERN: case FAKE_SRC_FILLTYPE_PATTERN_CONT: default: GST_BUFFER_DATA (buf) = g_malloc (size); + GST_BUFFER_MALLOCDATA (buf) = GST_BUFFER_DATA (buf); gst_fake_src_prepare_buffer (src, buf); break; } diff --git a/tests/check/Makefile.am b/tests/check/Makefile.am index e32898d60f..eade55243a 100644 --- a/tests/check/Makefile.am +++ b/tests/check/Makefile.am @@ -86,7 +86,6 @@ net_gstnettimeprovider_LDADD = \ # valgrind testing # these just need valgrind fixing, period VALGRIND_TO_FIX = \ - elements/fakesrc \ gst/gstevent \ gst-libs/controller \ pipelines/simple_launch_lines