From b263ae123c73386ec3c5674e9b5faf6c39c7c689 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 18 Jan 2010 10:57:42 +0100 Subject: [PATCH] cdxaparse: Fix buffer leak Fixes bug #607285. --- gst/cdxaparse/gstcdxaparse.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gst/cdxaparse/gstcdxaparse.c b/gst/cdxaparse/gstcdxaparse.c index 373aac7570..466e287f99 100644 --- a/gst/cdxaparse/gstcdxaparse.c +++ b/gst/cdxaparse/gstcdxaparse.c @@ -304,6 +304,9 @@ gst_cdxa_parse_loop (GstPad * sinkpad) } sync_offset = gst_cdxa_parse_sync (buf); + gst_buffer_unref (buf); + buf = NULL; + if (sync_offset >= 0) break; @@ -358,6 +361,9 @@ gst_cdxa_parse_loop (GstPad * sinkpad) eos: { GST_DEBUG_OBJECT (cdxa, "Sending EOS"); + if (buf) + gst_buffer_unref (buf); + buf = NULL; gst_pad_push_event (cdxa->srcpad, gst_event_new_eos ()); /* fallthrough */ }