mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-23 20:46:14 +01:00
Don't leak references to the menus
This commit is contained in:
parent
f077127d01
commit
cc03b3cdea
@ -205,6 +205,7 @@ g_menu_markup_start_element (GMarkupParseContext *context,
|
|||||||
if (state->objects)
|
if (state->objects)
|
||||||
g_hash_table_insert (state->objects, g_strdup (id), g_object_ref (menu));
|
g_hash_table_insert (state->objects, g_strdup (id), g_object_ref (menu));
|
||||||
}
|
}
|
||||||
|
g_object_unref (menu);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -225,6 +226,7 @@ g_menu_markup_start_element (GMarkupParseContext *context,
|
|||||||
if (state->objects)
|
if (state->objects)
|
||||||
g_hash_table_insert (state->objects, g_strdup (id), g_object_ref (menu));
|
g_hash_table_insert (state->objects, g_strdup (id), g_object_ref (menu));
|
||||||
}
|
}
|
||||||
|
g_object_unref (menu);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -280,6 +282,7 @@ g_menu_markup_start_element (GMarkupParseContext *context,
|
|||||||
|
|
||||||
if (id != NULL && state->objects)
|
if (id != NULL && state->objects)
|
||||||
g_hash_table_insert (state->objects, g_strdup (id), g_object_ref (menu));
|
g_hash_table_insert (state->objects, g_strdup (id), g_object_ref (menu));
|
||||||
|
g_object_unref (menu);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user