mirror of
https://github.com/michaelrsweet/pdfio.git
synced 2025-08-29 15:22:06 +02:00
Move token buffers off the stack (Issue #117)
This commit is contained in:
@@ -110,6 +110,8 @@ pdfioFileClose(pdfio_file_t *pdf) // I - PDF file
|
||||
{
|
||||
bool ret = true; // Return value
|
||||
size_t i; // Looping var
|
||||
_pdfio_strbuf_t *current, // Current string buffer
|
||||
*next; // Next string buffer
|
||||
|
||||
|
||||
// Range check input
|
||||
@@ -152,6 +154,12 @@ pdfioFileClose(pdfio_file_t *pdf) // I - PDF file
|
||||
free(pdf->strings[i]);
|
||||
free(pdf->strings);
|
||||
|
||||
for (current = pdf->strbuffers; current; current = next)
|
||||
{
|
||||
next = current->next;
|
||||
free(current);
|
||||
}
|
||||
|
||||
free(pdf);
|
||||
|
||||
return (ret);
|
||||
|
Reference in New Issue
Block a user