diff options
-rw-r--r-- | apps/mupdfdraw.c | 2 | ||||
-rw-r--r-- | apps/muxpsdraw.c | 2 | ||||
-rw-r--r-- | apps/pdfapp.c | 2 | ||||
-rw-r--r-- | fitz/doc_outline.c | 10 | ||||
-rw-r--r-- | fitz/fitz.h | 3 | ||||
-rw-r--r-- | pdf/pdf_outline.c | 1 |
6 files changed, 9 insertions, 11 deletions
diff --git a/apps/mupdfdraw.c b/apps/mupdfdraw.c index 552fe31a..06e74842 100644 --- a/apps/mupdfdraw.c +++ b/apps/mupdfdraw.c @@ -354,7 +354,7 @@ static void drawoutline(pdf_document *doc) fz_debug_outline_xml(outline, 0); else fz_debug_outline(outline, 0); - fz_free_outline(outline); + fz_free_outline(doc->ctx, outline); } #ifdef MUPDF_COMBINED_EXE diff --git a/apps/muxpsdraw.c b/apps/muxpsdraw.c index 8fec8efa..53956478 100644 --- a/apps/muxpsdraw.c +++ b/apps/muxpsdraw.c @@ -260,7 +260,7 @@ static void drawoutline(xps_document *doc) fz_debug_outline_xml(outline, 0); else fz_debug_outline(outline, 0); - fz_free_outline(outline); + fz_free_outline(doc->ctx, outline); } #ifdef MUPDF_COMBINED_EXE diff --git a/apps/pdfapp.c b/apps/pdfapp.c index 74479a1c..48e9fe93 100644 --- a/apps/pdfapp.c +++ b/apps/pdfapp.c @@ -262,7 +262,7 @@ void pdfapp_close(pdfapp_t *app) app->image = NULL; if (app->outline) - fz_free_outline(app->outline); + fz_free_outline(app->ctx, app->outline); app->outline = NULL; if (app->pdf) diff --git a/fitz/doc_outline.c b/fitz/doc_outline.c index 6896475e..fc50b57f 100644 --- a/fitz/doc_outline.c +++ b/fitz/doc_outline.c @@ -1,15 +1,15 @@ #include "fitz.h" void -fz_free_outline(fz_outline *outline) +fz_free_outline(fz_context *ctx, fz_outline *outline) { while (outline) { fz_outline *next = outline->next; - fz_free_outline(outline->down); - fz_free(outline->ctx, outline->title); - fz_free_link_dest(outline->ctx, &outline->dest); - fz_free(outline->ctx, outline); + fz_free_outline(ctx, outline->down); + fz_free(ctx, outline->title); + fz_free_link_dest(ctx, &outline->dest); + fz_free(ctx, outline); outline = next; } } diff --git a/fitz/fitz.h b/fitz/fitz.h index d7deac40..3eebaf59 100644 --- a/fitz/fitz.h +++ b/fitz/fitz.h @@ -1588,7 +1588,6 @@ typedef struct fz_outline_s fz_outline; struct fz_outline_s { - fz_context *ctx; char *title; fz_link_dest dest; fz_outline *next; @@ -1597,6 +1596,6 @@ struct fz_outline_s void fz_debug_outline_xml(fz_outline *outline, int level); void fz_debug_outline(fz_outline *outline, int level); -void fz_free_outline(fz_outline *outline); +void fz_free_outline(fz_context *ctx, fz_outline *outline); #endif diff --git a/pdf/pdf_outline.c b/pdf/pdf_outline.c index 2815d918..e5c87f8c 100644 --- a/pdf/pdf_outline.c +++ b/pdf/pdf_outline.c @@ -20,7 +20,6 @@ pdf_load_outline_imp(pdf_document *xref, fz_obj *dict) if (fz_dict_mark(dict)) break; node = fz_malloc_struct(ctx, fz_outline); - node->ctx = ctx; node->title = NULL; node->dest.kind = FZ_LINK_NONE; node->down = NULL; |