gnucash master: [dialog-file-access] plug a char* leak

Christopher Lam clam at code.gnucash.org
Thu Mar 16 11:27:47 EDT 2023


Updated	 via  https://github.com/Gnucash/gnucash/commit/ef0c9deb (commit)
	from  https://github.com/Gnucash/gnucash/commit/f6d01384 (commit)



commit ef0c9deb7f07f69783010f59821ae07792978c0c
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Thu Mar 16 23:18:47 2023 +0800

    [dialog-file-access] plug a char* leak

diff --git a/gnucash/gnome-utils/dialog-file-access.c b/gnucash/gnome-utils/dialog-file-access.c
index 01ba3bdec8..347baa2513 100644
--- a/gnucash/gnome-utils/dialog-file-access.c
+++ b/gnucash/gnome-utils/dialog-file-access.c
@@ -84,7 +84,10 @@ geturl( FileAccessWindow* faw )
     {
         path = gtk_file_chooser_get_filename (faw->fileChooser);
         if ( !path ) /* file protocol was chosen but no filename was set */
+        {
+            g_free (type);
             return NULL;
+        }
     }
     else                    /* db protocol was chosen */
     {



Summary of changes:
 gnucash/gnome-utils/dialog-file-access.c | 3 +++
 1 file changed, 3 insertions(+)



More information about the gnucash-changes mailing list