mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-03 14:08:56 +00:00
memleak fix
Original commit message from CVS: memleak fix
This commit is contained in:
parent
6f2ff2f81e
commit
b28455b1d6
1 changed files with 16 additions and 14 deletions
|
@ -290,9 +290,11 @@ gst_unitconv_register_unit(const gchar *domain_name,
|
|||
unit_name = g_strdup(g_param_spec_get_name(unit_spec));
|
||||
|
||||
/* check if this unit name already exists */
|
||||
g_return_val_if_fail (
|
||||
g_hash_table_lookup(_gst_units, unit_name) == NULL, FALSE);
|
||||
|
||||
if (g_hash_table_lookup (_gst_units, unit_name) != NULL)
|
||||
{
|
||||
g_free (unit_name);
|
||||
return FALSE;
|
||||
}
|
||||
if (is_domain_default){
|
||||
/* check if an default unit already exists for this domain */
|
||||
g_return_val_if_fail (
|
||||
|
@ -310,7 +312,7 @@ gst_unitconv_register_unit(const gchar *domain_name,
|
|||
unit->convert_to_funcs = g_hash_table_new(NULL,NULL);
|
||||
/* unit->convert_properties = g_hash_table_new(g_str_hash,g_str_equal); */
|
||||
|
||||
g_hash_table_insert(_gst_units, g_strdup(unit_name), unit);
|
||||
g_hash_table_insert(_gst_units, unit_name, unit);
|
||||
|
||||
if (is_domain_default){
|
||||
g_hash_table_insert(_gst_unit_domain_defaults, g_strdup(domain_name), unit);
|
||||
|
|
Loading…
Reference in a new issue