r17823 - gnucash/branches/2.2/lib/libqof/qof - [17813] Initialize GError in qof_log_parse_log_config().

Christian Stimming cstim at cvs.gnucash.org
Wed Jan 14 15:13:11 EST 2009


Author: cstim
Date: 2009-01-14 15:13:11 -0500 (Wed, 14 Jan 2009)
New Revision: 17823
Trac: http://svn.gnucash.org/trac/changeset/17823

Modified:
   gnucash/branches/2.2/lib/libqof/qof/qoflog.c
Log:
[17813] Initialize GError in qof_log_parse_log_config().

This avoids a crash when the log configuration is not valid.

Original patch by andi5.

Modified: gnucash/branches/2.2/lib/libqof/qof/qoflog.c
===================================================================
--- gnucash/branches/2.2/lib/libqof/qof/qoflog.c	2009-01-14 20:13:05 UTC (rev 17822)
+++ gnucash/branches/2.2/lib/libqof/qof/qoflog.c	2009-01-14 20:13:11 UTC (rev 17823)
@@ -243,7 +243,7 @@
 qof_log_parse_log_config(const char *filename)
 {
      const gchar *levels_group = "levels", *output_group = "output";
-     GError *err;
+     GError *err = NULL;
      GKeyFile *conf = g_key_file_new();
 
      if (!g_key_file_load_from_file(conf, filename, G_KEY_FILE_NONE, &err))



More information about the gnucash-changes mailing list