GNOME Bugzilla – Bug 652257
Memory leak in gnc-file.c
Last modified: 2018-06-29 22:59:01 UTC
Created attachment 189600 [details] [review] Patch to fix the memory leak. I found a memory leak in gnc-file.c. In gnc_file_quit(), gnc_get_current_session() is called a second time for seemingly no purpose. This results in a large number of errors reported by valgrind due to memory leaks. Removing this call dropped the "possibly lost" and "definitely lost" memory errors reported by valgrind from 12,873 to 10,868. These were the # of errors reported for simply launching and then closing the app (with a very, very basic gnucash XML file opened by default containing default accounts and only a couple transactions). The patch does not cause GnuCash to crash nor does it _seem_ to cause any problems, but it has not been tested extensively. I was researching https://bugzilla.gnome.org/show_bug.cgi?id=431324 when I ran into this, but the original defect still seems to occur so I am logging this as a separate issue. There are many more errors reported by valgrind so it may take some time to figure out exactly what is causing #431324. Thanks, -Tim
Comment on attachment 189600 [details] [review] Patch to fix the memory leak. Committed in r20792 (trunk) and r20793 (2.4x.). Thanks a lot !
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=652257. Please update any external references or bookmarks.