Fix memory leaks:

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):
This commit is contained in:
David Schleef 2004-02-02 20:27:13 +00:00
parent 9e6362dd89
commit 8e29a788e4
2 changed files with 10 additions and 2 deletions

View file

@ -517,8 +517,12 @@ gst_ffmpegdec_register (GstPlugin *plugin)
/* 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),

View file

@ -661,8 +661,12 @@ gst_ffmpegenc_register (GstPlugin *plugin)
/* 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),