gnucash stable: [gnc-plugin-business.c] free owners from business plugin

Christopher Lam clam at code.gnucash.org
Sat Jul 8 00:11:27 EDT 2023


Updated	 via  https://github.com/Gnucash/gnucash/commit/625fc1d6 (commit)
	from  https://github.com/Gnucash/gnucash/commit/e8d2d8dc (commit)



commit 625fc1d6cdccf6fb767c29964f61c202e1e9037d
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Thu Jul 6 22:57:34 2023 +0800

    [gnc-plugin-business.c] free owners from business plugin
    
    They're being allocated with gncOwnerNew in gnc_plugin_business_init

diff --git a/gnucash/gnome/gnc-plugin-business.c b/gnucash/gnome/gnc-plugin-business.c
index fe4c97d30b..a4c62e83f5 100644
--- a/gnucash/gnome/gnc-plugin-business.c
+++ b/gnucash/gnome/gnc-plugin-business.c
@@ -241,6 +241,11 @@ gnc_plugin_business_finalize (GObject *object)
 {
     g_return_if_fail (GNC_IS_PLUGIN_BUSINESS (object));
 
+    GncPluginBusiness *plugin = (GncPluginBusiness*) object;
+    gncOwnerFree (plugin->last_customer);
+    gncOwnerFree (plugin->last_vendor);
+    gncOwnerFree (plugin->last_employee);
+
     G_OBJECT_CLASS (gnc_plugin_business_parent_class)->finalize (object);
 }
 



Summary of changes:
 gnucash/gnome/gnc-plugin-business.c | 5 +++++
 1 file changed, 5 insertions(+)



More information about the gnucash-changes mailing list