r21198 - gnucash/trunk/src/backend/xml - (cppcheck) Fix "error: Memory leak: gea"

Christian Stimming cstim at code.gnucash.org
Sun Aug 21 15:42:11 EDT 2011


Author: cstim
Date: 2011-08-21 15:42:10 -0400 (Sun, 21 Aug 2011)
New Revision: 21198
Trac: http://svn.gnucash.org/trac/changeset/21198

Modified:
   gnucash/trunk/src/backend/xml/io-example-account.c
Log:
(cppcheck) Fix "error: Memory leak: gea"

Patch by Aurimas Fišeras.

Modified: gnucash/trunk/src/backend/xml/io-example-account.c
===================================================================
--- gnucash/trunk/src/backend/xml/io-example-account.c	2011-08-21 19:42:00 UTC (rev 21197)
+++ gnucash/trunk/src/backend/xml/io-example-account.c	2011-08-21 19:42:10 UTC (rev 21198)
@@ -334,6 +334,7 @@
                 GNC_ACCOUNT_STRING, main_parser,
                 NULL, NULL))
     {
+        gnc_destroy_example_account(gea);
         return FALSE;
     }
 
@@ -347,6 +348,7 @@
                 "gnc:account", gnc_account_sixtp_parser_create(),
                 NULL, NULL))
     {
+        gnc_destroy_example_account(gea);
         return FALSE;
     }
 
@@ -355,6 +357,7 @@
     {
         sixtp_destroy(top_parser);
         xaccLogEnable ();
+        gnc_destroy_example_account(gea);
         return FALSE;
     }
 



More information about the gnucash-changes mailing list