From a9be41dc9967f489e2a4e54d38464c893f2f5d35 Mon Sep 17 00:00:00 2001 From: Ivan Dmitrievich Yartsev Date: Thu, 16 Apr 2026 14:28:33 +0600 Subject: [PATCH] Fixed memory leak --- source/ubinstall-gtk-config-hub.c | 4 ++-- source/ubinstall-gtk-page-switch.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/ubinstall-gtk-config-hub.c b/source/ubinstall-gtk-config-hub.c index 83a68e9..7792e6d 100644 --- a/source/ubinstall-gtk-config-hub.c +++ b/source/ubinstall-gtk-config-hub.c @@ -236,6 +236,8 @@ void on_configuration_hub_open(GtkFlowBox *,GtkFlowBoxChild *child, main_window config_hub_icon *cur_icon = g_object_get_data(G_OBJECT(child),"config_hub_icon"); gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),cur_icon->page); + yon_page_init(widgets,cur_icon->page); + yon_page_update(widgets); switch(cur_icon->page){ case YON_PAGE_OS_COMPONENTS: case YON_PAGE_KERNEL: @@ -247,8 +249,6 @@ void on_configuration_hub_open(GtkFlowBox *,GtkFlowBoxChild *child, main_window break; default: break; }; - yon_page_init(widgets,cur_icon->page); - yon_page_update(widgets); } void yon_configuration_hub_add(GtkFlowBox *target, char *name, char *icon, enum YON_PAGES page){ diff --git a/source/ubinstall-gtk-page-switch.c b/source/ubinstall-gtk-page-switch.c index e0d4fbe..bf37402 100644 --- a/source/ubinstall-gtk-page-switch.c +++ b/source/ubinstall-gtk-page-switch.c @@ -602,6 +602,7 @@ void on_page_next_clicked(GtkWidget *, main_window *widgets){ page = yon_page_get_next(widgets,page); if ((int)page!=-1){ gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),page); + yon_page_init(widgets,page); switch(page){ case YON_PAGE_KERNEL: case YON_PAGE_KERNEL_ADDON: @@ -612,7 +613,6 @@ void on_page_next_clicked(GtkWidget *, main_window *widgets){ break; default: break; }; - yon_page_init(widgets,page); } yon_page_update(widgets); }