gnucash maint: [gnc-plugin-page-register] plug memory leak
Christopher Lam
clam at code.gnucash.org
Thu May 6 09:35:42 EDT 2021
Updated via https://github.com/Gnucash/gnucash/commit/8124ab0a (commit)
from https://github.com/Gnucash/gnucash/commit/85a4baeb (commit)
commit 8124ab0ad40dab57adc878a91a51dce9490f2662
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Thu May 6 20:23:21 2021 +0800
[gnc-plugin-page-register] plug memory leak
nothing frees the g_strdup
diff --git a/gnucash/gnome/gnc-plugin-page-register.c b/gnucash/gnome/gnc-plugin-page-register.c
index c801aa9f4..fcf312599 100644
--- a/gnucash/gnome/gnc-plugin-page-register.c
+++ b/gnucash/gnome/gnc-plugin-page-register.c
@@ -3181,7 +3181,7 @@ gnc_plugin_page_register_filter_start_cb (GtkWidget* radio,
}
name = gtk_buildable_get_name (GTK_BUILDABLE (radio));
- active = (g_strcmp0 (name, g_strdup ("start_date_choose")) == 0 ? 1 : 0);
+ active = !g_strcmp0 (name, "start_date_choose");
gtk_widget_set_sensitive (priv->fd.start_date, active);
get_filter_times (page);
gnc_ppr_update_date_query (page);
@@ -3229,7 +3229,7 @@ gnc_plugin_page_register_filter_end_cb (GtkWidget* radio,
}
name = gtk_buildable_get_name (GTK_BUILDABLE (radio));
- active = (g_strcmp0 (name, g_strdup ("end_date_choose")) == 0 ? 1 : 0);
+ active = !g_strcmp0 (name, "end_date_choose");
gtk_widget_set_sensitive (priv->fd.end_date, active);
get_filter_times (page);
gnc_ppr_update_date_query (page);
Summary of changes:
gnucash/gnome/gnc-plugin-page-register.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
More information about the gnucash-changes
mailing list