Commit 6a628fe4 authored by Morten Welinder's avatar Morten Welinder

Leak fixes.

parent c4588419
2000-04-09 Morten Welinder <terra@diku.dk>
* ms-excel-read.c (ms_excel_sheet_append_comment): Constify.
(ms_excel_sheet_set_comment): Ditto.
(ms_excel_read_sheet): Plug leak.
2000-04-08 Jon K Hellan <hellan@acm.org>
* ms-excel-read.c (ms_excel_set_xf, ms_excel_read_formula,
......
......@@ -2070,7 +2070,7 @@ ms_excel_sheet_insert_blank (ExcelSheet *sheet, int xfidx,
}
static void
ms_excel_sheet_set_comment (ExcelSheet *sheet, int col, int row, char *text)
ms_excel_sheet_set_comment (ExcelSheet *sheet, int col, int row, const char *text)
{
if (text) {
Cell *cell = sheet_cell_get (sheet->gnum_sheet, col, row);
......@@ -2083,7 +2083,7 @@ ms_excel_sheet_set_comment (ExcelSheet *sheet, int col, int row, char *text)
}
static void
ms_excel_sheet_append_comment (ExcelSheet *sheet, int col, int row, char *text)
ms_excel_sheet_append_comment (ExcelSheet *sheet, int col, int row, const char *text)
{
if (text) {
Cell *cell = sheet_cell_fetch (sheet->gnum_sheet, col, row);
......@@ -3146,6 +3146,7 @@ ms_excel_read_sheet (ExcelSheet *sheet, BiffQuery *q, ExcelWorkbook *wb)
ms_excel_sheet_append_comment (sheet, col, row, text);
else
ms_excel_sheet_set_comment (sheet, col, row, text);
g_free (text);
}
break;
}
......
......@@ -851,7 +851,7 @@ sheet_view_comment_relocate (SheetView *sheet_view, int col, int row, GnomeCanva
points = sheet_view_comment_get_points (sheet_view, col, row);
gnome_canvas_item_set (o, "points", points, NULL);
g_free (points);
gnome_canvas_points_free (points);
}
void
......
......@@ -1673,14 +1673,10 @@ sheet_unique_cb (Sheet *sheet, Range const *range,
range, &all, i, edge_valid [i]);
/* 6. Free up resources */
if (middle_list)
g_list_free (middle_list);
g_list_free (middle_list);
g_list_free (all_list);
for (i = STYLE_BORDER_TOP; i <= STYLE_BORDER_RIGHT; i++) {
if (edge_valid [i] && edge_list [i])
g_list_free (edge_list [i]);
edge_list [i] = NULL;
}
for (i = STYLE_BORDER_TOP; i <= STYLE_BORDER_RIGHT; i++)
g_list_free (edge_list [i]);
return TRUE;
}
......
......@@ -851,7 +851,7 @@ sheet_view_comment_relocate (SheetView *sheet_view, int col, int row, GnomeCanva
points = sheet_view_comment_get_points (sheet_view, col, row);
gnome_canvas_item_set (o, "points", points, NULL);
g_free (points);
gnome_canvas_points_free (points);
}
void
......
2000-04-09 Morten Welinder <terra@diku.dk>
* widget-font-selector.c (reload_preview): Plug leaks.
2000-04-09 Jon K Hellan <hellan@acm.org>
* gtk-combo-text.[ch]: Fix problem with mouseover: Mouseover from
......
......@@ -53,6 +53,7 @@ reload_preview (FontSelector *fs)
fs->resolution_adjustment_factor);
if (!display_font) {
gtk_object_unref (GTK_OBJECT (gnome_font));
g_warning ("Uh oh, cannot get the display font");
return;
}
......@@ -62,6 +63,9 @@ reload_preview (FontSelector *fs)
return;
}
if (fs->gnome_font)
gtk_object_unref (GTK_OBJECT (fs->gnome_font));
fs->gnome_font = gnome_font;
fs->display_font = display_font;
......@@ -231,7 +235,10 @@ fs_init (FontSelector *fs)
{
GtkWidget *toplevel;
GtkWidget *old_parent;
fs->gnome_font = NULL;
fs->display_font = NULL;
fs->gui = glade_xml_new (GNUMERIC_GLADEDIR "/font-sel.glade", NULL);
if (!fs->gui) {
g_warning ("Could not load font-sel.glade");
......
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