Original commit message from CVS:
reviewed by: David Schleef <ds@schleef.org>
Fix memory leaks:
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_register):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_register):
/* create the gtype now */
type = g_type_register_static(GST_TYPE_ELEMENT, type_name , &typeinfo, 0);
- if (!gst_element_register (plugin, type_name, GST_RANK_MARGINAL, type))
+ if (!gst_element_register (plugin, type_name, GST_RANK_MARGINAL, type)) {
+ g_free (type_name);
return FALSE;
+ }
+
+ g_free (type_name);
g_hash_table_insert (global_plugins,
GINT_TO_POINTER (type),
/* create the glib type now */
type = g_type_register_static(GST_TYPE_ELEMENT, type_name , &typeinfo, 0);
- if (!gst_element_register (plugin, type_name, GST_RANK_NONE, type))
+ if (!gst_element_register (plugin, type_name, GST_RANK_NONE, type)) {
+ g_free (type_name);
return FALSE;
+ }
+
+ g_free (type_name);
g_hash_table_insert (enc_global_plugins,
GINT_TO_POINTER (type),