gst-plugins-bad: opusenc: fix slist leak

Vincent Penquerc'h vincent at kemper.freedesktop.org
Tue Jan 10 05:40:03 PST 2012


Module: gst-plugins-bad
Branch: master
Commit: 1f543ec0ada7849a25a6451679eeb3cd3f605c1f
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=1f543ec0ada7849a25a6451679eeb3cd3f605c1f

Author: Vincent Penquerc'h <vincent.penquerch at collabora.co.uk>
Date:   Tue Jan 10 13:38:50 2012 +0000

opusenc: fix slist leak

---

 ext/opus/gstopusenc.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/ext/opus/gstopusenc.c b/ext/opus/gstopusenc.c
index 016b891..9b475cf 100644
--- a/ext/opus/gstopusenc.c
+++ b/ext/opus/gstopusenc.c
@@ -360,6 +360,7 @@ gst_opus_enc_stop (GstAudioEncoder * benc)
   gst_tag_list_free (enc->tags);
   enc->tags = NULL;
   g_slist_foreach (enc->headers, (GFunc) gst_buffer_unref, NULL);
+  g_slist_free (enc->headers);
   enc->headers = NULL;
   gst_tag_setter_reset_tags (GST_TAG_SETTER (enc));
 
@@ -885,6 +886,7 @@ gst_opus_enc_handle_frame (GstAudioEncoder * benc, GstBuffer * buf)
     GstCaps *caps;
 
     g_slist_foreach (enc->headers, (GFunc) gst_buffer_unref, NULL);
+    g_slist_free (enc->headers);
     enc->headers = NULL;
 
     gst_opus_header_create_caps (&caps, &enc->headers, enc->n_channels,



More information about the gstreamer-commits mailing list