mirror of
https://github.com/jmcnamara/libxlsxwriter.git
synced 2026-05-21 06:45:21 -06:00
Fix for memory leaks.
This commit is contained in:
parent
12afebc6d0
commit
7bbb268acd
1 changed files with 8 additions and 1 deletions
|
|
@ -128,7 +128,8 @@ _free_cell(lxw_cell *cell)
|
|||
if (!cell)
|
||||
return;
|
||||
|
||||
if (cell->type == FORMULA_CELL || cell->type == INLINE_STRING_CELL)
|
||||
if (cell->type == FORMULA_CELL || cell->type == ARRAY_FORMULA_CELL
|
||||
|| cell->type == INLINE_STRING_CELL)
|
||||
free(cell->u.string);
|
||||
|
||||
free(cell->range);
|
||||
|
|
@ -1426,6 +1427,9 @@ _worksheet_write_page_set_up_pr(lxw_worksheet *self)
|
|||
_PUSH_ATTRIBUTES_STR("fitToPage", "1");
|
||||
|
||||
_xml_empty_tag(self->file, "pageSetUpPr", &attributes);
|
||||
|
||||
_FREE_ATTRIBUTES();
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -1462,6 +1466,9 @@ _worksheet_write_sheet_pr(lxw_worksheet *self)
|
|||
else {
|
||||
_xml_empty_tag(self->file, "sheetPr", &attributes);
|
||||
}
|
||||
|
||||
_FREE_ATTRIBUTES();
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue