r16246 - gnucash/trunk/src/import-export/hbci - Fix crash on empty aqbanking backend list. #452421.

Christian Stimming cstim at cvs.gnucash.org
Mon Jul 2 16:26:27 EDT 2007


Author: cstim
Date: 2007-07-02 16:26:26 -0400 (Mon, 02 Jul 2007)
New Revision: 16246
Trac: http://svn.gnucash.org/trac/changeset/16246

Modified:
   gnucash/trunk/src/import-export/hbci/druid-hbci-initial.c
Log:
Fix crash on empty aqbanking backend list. #452421.


Modified: gnucash/trunk/src/import-export/hbci/druid-hbci-initial.c
===================================================================
--- gnucash/trunk/src/import-export/hbci/druid-hbci-initial.c	2007-07-02 17:12:13 UTC (rev 16245)
+++ gnucash/trunk/src/import-export/hbci/druid-hbci-initial.c	2007-07-02 20:26:26 UTC (rev 16246)
@@ -508,13 +508,15 @@
 
       /* User pressed cancel in choice dialog */
       if (x == -1) {
-	GWEN_PluginDescription_List2_freeAll(pluginlist);
+	if (pluginlist)
+	  GWEN_PluginDescription_List2_freeAll(pluginlist);
 #if ((GWENHYWFAR_VERSION_MAJOR < 1) || \
      ((GWENHYWFAR_VERSION_MAJOR == 1) && \
       ((GWENHYWFAR_VERSION_MINOR < 98))))
 	/* Memory cleanup needed for gwenhywfar<1.98.x but not for
 	   gwenhywfar>=1.98.x */
-	GWEN_PluginDescription_List2_free(pluginlist);
+	if (pluginlist)
+	  GWEN_PluginDescription_List2_free(pluginlist);
 #endif
 	return;
       }
@@ -533,13 +535,15 @@
   /* Allocate the backend name again because the PluginDescr list will
      be freed */
   backend_name = g_strdup (backend_name_nc);
-  GWEN_PluginDescription_List2_freeAll (pluginlist);
+  if (pluginlist)
+    GWEN_PluginDescription_List2_freeAll (pluginlist);
 #if ((GWENHYWFAR_VERSION_MAJOR < 1) || \
      ((GWENHYWFAR_VERSION_MAJOR == 1) && \
       ((GWENHYWFAR_VERSION_MINOR < 98))))
   /* Memory cleanup needed for gwenhywfar<1.98.x but not for
      gwenhywfar>=1.98.x */
-  GWEN_PluginDescription_List2_free (pluginlist);
+  if (pluginlist)
+    GWEN_PluginDescription_List2_free (pluginlist);
 #endif
   }
 



More information about the gnucash-changes mailing list