gst/playback/gstplaybasebin.c: Fix leak in add_stream(), when g_value_set_object...
authorTommi Myöhänen <ext-tommi.myohanen@nokia.com>
Thu, 5 Apr 2007 10:27:06 +0000 (10:27 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Thu, 5 Apr 2007 10:27:06 +0000 (10:27 +0000)
Original commit message from CVS:
Patch by: Tommi Myöhänen <ext-tommi dot myohanen at nokia dot com>
* gst/playback/gstplaybasebin.c: (add_stream):
Fix leak in add_stream(), when g_value_set_object() increases the
refcount of streaminfo object. Fixes #426250.

ChangeLog
gst/playback/gstplaybasebin.c

index 7112d10a5008a1d394c2f6a0b09eefe03201f58b..1fdc290dbb390d23587960fd3f8200955ce250da 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2007-04-05  Wim Taymans  <wim@fluendo.com>
+
+       Patch by: Tommi Myöhänen <ext-tommi dot myohanen at nokia dot com>
+
+       * gst/playback/gstplaybasebin.c: (add_stream):
+       Fix leak in add_stream(), when g_value_set_object() increases the
+       refcount of streaminfo object. Fixes #426250.
+
 2007-04-03  David Schleef  <ds@schleef.org>
 
        * gst/videotestsrc/gstvideotestsrc.c:
index 4fa09c60b006878f6e1a47031f6324ad6f2a46a6..76d5f380a7d569cc195f38a412dc40185f19eb52 100644 (file)
@@ -912,6 +912,7 @@ add_stream (GstPlayBaseGroup * group, GstStreamInfo * info)
   g_value_init (&v, G_TYPE_OBJECT);
   g_value_set_object (&v, info);
   g_value_array_append (group->streaminfo_value_array, &v);
+  g_value_unset (&v);
   group->streaminfo = g_list_append (group->streaminfo, info);
   if (info->type > 0 && info->type <= NUM_TYPES) {
     group->type[info->type - 1].npads++;