Commit 5b9e6dff authored by Miguel de Icaza's avatar Miguel de Icaza Committed by Arturo Espinosa

Initialize this to NULL.

1999-09-14  Miguel de Icaza  <miguel@gnu.org>

	* src/format.c: Initialize this to NULL.

	* src/print-info.c (load_formats): Memory leak fix.

	* src/xml-io.c (xml_read_summary): Fixed memory leak.
parent 5049ba03
1999-09-14 Miguel de Icaza <miguel@gnu.org>
* src/format.c: Initialize this to NULL.
* src/print-info.c (load_formats): Memory leak fix.
* src/xml-io.c (xml_read_summary): Fixed memory leak.
1999-09-14 Morten Welinder <terra@diku.dk>
* src/dialogs/dialog-analysis-tools.c (tools): Make static.
......
1999-09-14 Miguel de Icaza <miguel@gnu.org>
* src/format.c: Initialize this to NULL.
* src/print-info.c (load_formats): Memory leak fix.
* src/xml-io.c (xml_read_summary): Fixed memory leak.
1999-09-14 Morten Welinder <terra@diku.dk>
* src/dialogs/dialog-analysis-tools.c (tools): Make static.
......
......@@ -38,7 +38,7 @@
#include "utils.h"
/* Points to the locale information for number display */
static struct lconv *lc;
static struct lconv *lc = NULL;
#define DECIMAL_CHAR_OF_LC(lc) ((lc)->decimal_point[0] ? (lc)->decimal_point[0] : '.')
#define THOUSAND_CHAR_OF_LC(lc) ((lc)->thousands_sep[0] ? (lc)->thousands_sep[0] : ',')
......
......@@ -215,8 +215,8 @@ load_formats (void)
PrintHF *format;
format = load_hf (str, "", "", "");
g_free (str);
hf_formats = g_list_prepend (hf_formats, format);
g_free (str);
}
hf_formats = g_list_reverse (hf_formats);
......
......@@ -2010,6 +2010,7 @@ workbook_new (void)
gnome_ui_handler_create_menubar (wb->uih);
list = gnome_ui_handler_menu_parse_uiinfo_list_with_data (workbook_menu, wb);
gnome_ui_handler_menu_add_list (wb->uih, "/", list);
gnome_ui_handler_menu_free_list (list);
}
#endif
......
......@@ -853,6 +853,7 @@ xml_read_summary (parse_xml_context_t *ctxt, xmlNodePtr tree, SummaryInfo *summa
child = tree->childs;
while (child) {
char *name = NULL;
if (child->name && !strcmp (child->name, "Item")) {
xmlNodePtr bits;
......@@ -871,7 +872,7 @@ xml_read_summary (parse_xml_context_t *ctxt, xmlNodePtr tree, SummaryInfo *summa
if (!strcmp (bits->name, "val-string"))
sit = summary_item_new_string (name, txt);
else if (!strcmp (bits->name, "val-int"))
sit = summary_item_new_int (name, atoi (txt));
sit = summary_item_new_int (name, atoi (txt));
if (sit)
summary_info_add (summary_info, sit);
......@@ -881,6 +882,10 @@ xml_read_summary (parse_xml_context_t *ctxt, xmlNodePtr tree, SummaryInfo *summa
bits = bits->next;
}
}
if (name){
free (name);
name = NULL;
}
child = child->next;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment