[gnome-control-center] region: Fix small memory leak
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] region: Fix small memory leak
- Date: Mon, 2 Jul 2018 22:01:08 +0000 (UTC)
commit 556388f373c0f1be860d371db91d88f0baac245d
Author: Robert Ancell <robert ancell canonical com>
Date: Fri Jun 29 15:05:48 2018 +1200
region: Fix small memory leak
Was introduced in 79e00c3
panels/region/cc-region-panel.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/panels/region/cc-region-panel.c b/panels/region/cc-region-panel.c
index d5848e57b..5795d1663 100644
--- a/panels/region/cc-region-panel.c
+++ b/panels/region/cc-region-panel.c
@@ -809,11 +809,7 @@ add_input_sources (CcRegionPanel *self,
GVariant *sources)
{
GVariantIter iter;
- const gchar *type;
- const gchar *id;
- const gchar *name;
- g_autofree gchar *display_name = NULL;
- g_autoptr(GDesktopAppInfo) app_info = NULL;
+ const gchar *type, *id;
if (g_variant_n_children (sources) < 1) {
add_no_input_row (self);
@@ -822,10 +818,12 @@ add_input_sources (CcRegionPanel *self,
g_variant_iter_init (&iter, sources);
while (g_variant_iter_next (&iter, "(&s&s)", &type, &id)) {
- display_name = NULL;
- app_info = NULL;
+ g_autoptr(GDesktopAppInfo) app_info = NULL;
+ g_autofree gchar *display_name = NULL;
if (g_str_equal (type, INPUT_SOURCE_TYPE_XKB)) {
+ const gchar *name;
+
gnome_xkb_info_get_layout_info (self->xkb_info, id, &name, NULL, NULL, NULL);
if (!name) {
g_warning ("Couldn't find XKB input source '%s'", id);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]