summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZaheer Abbas Merali <zaheerabbas@merali.org>2004-06-15 21:58:18 +0000
committerZaheer Abbas Merali <zaheerabbas@merali.org>2004-06-15 21:58:18 +0000
commit85222e4aa197701004beb7ab485e775ed9b11b9f (patch)
tree2479a87160d04d3bdb350eb6dab45dcc45cff761
parent36218938a2eff5afbffb890159180cc98a6e80e0 (diff)
downloadgst-plugins-bad-85222e4aa197701004beb7ab485e775ed9b11b9f.tar.gz
gst-plugins-bad-85222e4aa197701004beb7ab485e775ed9b11b9f.tar.bz2
gst-plugins-bad-85222e4aa197701004beb7ab485e775ed9b11b9f.zip
fixed a potential leak with previous commit
Original commit message from CVS: 2004-06-15 Zaheer Abbas Merali <zaheerabbas at merali.org> fixed a potential leak with previous commit * gst-libs/gst/riff/riff-read.c: (gst_riff_peek_head):
-rw-r--r--ChangeLog6
-rw-r--r--gst-libs/gst/riff/riff-read.c5
2 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 46617f07..e3717684 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2004-06-15 Zaheer Abbas Merali <zaheerabbas at merali.org>
+ fixed a potential leak with previous commit
+
+ * gst-libs/gst/riff/riff-read.c: (gst_riff_peek_head):
+
+2004-06-15 Zaheer Abbas Merali <zaheerabbas at merali.org>
+
* gst-libs/gst/riff/riff-read.c: (gst_riff_peek_head):
Added missing refcount, fixes bug #144425
Cheers Tim for finding the bug
diff --git a/gst-libs/gst/riff/riff-read.c b/gst-libs/gst/riff/riff-read.c
index 6f5c5b2c..be3e10da 100644
--- a/gst-libs/gst/riff/riff-read.c
+++ b/gst-libs/gst/riff/riff-read.c
@@ -180,9 +180,10 @@ gst_riff_peek_head (GstRiffRead * riff,
/* Here, we might encounter EOS */
gst_bytestream_get_status (riff->bs, &remaining, &event);
if (GST_IS_EVENT (event)) {
- gst_event_ref (event);
+ gboolean eos = (GST_EVENT_TYPE (event) == GST_EVENT_EOS);
+
gst_pad_event_default (riff->sinkpad, event);
- if (GST_EVENT_TYPE (event) == GST_EVENT_EOS)
+ if (eos)
return FALSE;
} else {
GST_ELEMENT_ERROR (riff, RESOURCE, READ, (NULL), (NULL));