gst/gst.c: Fix missing g_strdup() and double free when using the
authorPeter Kjellerstedt <pkj@axis.com>
Wed, 28 Jun 2006 15:19:08 +0000 (15:19 +0000)
committerTim-Philipp Müller <tim@centricular.net>
Wed, 28 Jun 2006 15:19:08 +0000 (15:19 +0000)
Original commit message from CVS:
Patch by: Peter Kjellerstedt <pkj at axis com>
* gst/gst.c: (prepare_for_load_plugin_func), (split_and_iterate):
Fix missing g_strdup() and double free when using the
--gst-plugin-load command line option (#346097).

ChangeLog
gst/gst.c

index d6aa4ea..8e81662 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-06-28  Tim-Philipp Müller  <tim at centricular dot net>
+
+       Patch by: Peter Kjellerstedt <pkj at axis com>
+
+       * gst/gst.c: (prepare_for_load_plugin_func), (split_and_iterate):
+         Fix missing g_strdup() and double free when using the
+         --gst-plugin-load command line option (#346097).
+
 2006-06-23  Tim-Philipp Müller  <tim at centricular dot net>
 
        * gst/gstinfo.c:
index 81d0c10..965a7a1 100644 (file)
--- a/gst/gst.c
+++ b/gst/gst.c
@@ -407,7 +407,7 @@ add_path_func (gpointer data, gpointer user_data)
 static void
 prepare_for_load_plugin_func (gpointer data, gpointer user_data)
 {
-  preload_plugins = g_slist_prepend (preload_plugins, data);
+  preload_plugins = g_slist_prepend (preload_plugins, g_strdup (data));
 }
 
 static void
@@ -455,7 +455,6 @@ split_and_iterate (const gchar * stringlist, gchar * separator, GFunc iterator,
       iterator (strings[j], user_data);
       if (++j == MAX_PATH_SPLIT) {
         lastlist = g_strdup (strings[j]);
-        g_strfreev (strings);
         j = 0;
         break;
       }