[0.11] gst-plugins-base: subparse: factor memory freeing

Vincent Penquerc'h vincent at kemper.freedesktop.org
Wed Jan 25 03:53:41 PST 2012


Module: gst-plugins-base
Branch: 0.11
Commit: 2de0a62381d6a9f65dbf97d354d395cb6e2a1d0f
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=2de0a62381d6a9f65dbf97d354d395cb6e2a1d0f

Author: Vincent Penquerc'h <vincent.penquerch at collabora.co.uk>
Date:   Tue Jan 24 17:44:21 2012 +0000

subparse: factor memory freeing

---

 gst/subparse/gstsubparse.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/gst/subparse/gstsubparse.c b/gst/subparse/gstsubparse.c
index cd8b8e0..4ca4fbe 100644
--- a/gst/subparse/gstsubparse.c
+++ b/gst/subparse/gstsubparse.c
@@ -1719,12 +1719,11 @@ gst_subparse_type_find (GstTypeFind * tf, gpointer private)
       GST_DEBUG ("Encoding '%s' detected but conversion failed: %s", encoding,
           err->message);
       g_error_free (err);
-      g_free (encoding);
     } else {
       g_free (str);
       str = converted_str;
-      g_free (encoding);
     }
+    g_free (encoding);
   }
 
   /* Check if at least the first 120 chars are valid UTF8,



More information about the gstreamer-commits mailing list