diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2011-09-19 02:48:12 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2011-09-20 22:34:25 +0200 |
commit | d0266d6f0863176ddc009d8ae33651e68e97fdde (patch) | |
tree | 162d768c3f6fe17e5a3fed6a51da0862dccc676b | |
parent | f788271e01f5c0ba97bc4ad561ae546ac11017c1 (diff) | |
download | mupdf-d0266d6f0863176ddc009d8ae33651e68e97fdde.tar.xz |
Plug some memory leaks in pdfapp.
-rw-r--r-- | apps/pdfapp.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/apps/pdfapp.c b/apps/pdfapp.c index 11ea4220..e96b94e6 100644 --- a/apps/pdfapp.c +++ b/apps/pdfapp.c @@ -210,6 +210,22 @@ void pdfapp_open(pdfapp_t *app, char *filename, int fd, int reload) void pdfapp_close(pdfapp_t *app) { + if (app->page_list) + fz_free_display_list(app->page_list); + app->page_list = NULL; + + if (app->page_text) + fz_free_text_span(app->page_text); + app->page_text = NULL; + + if (app->page_links) + pdf_free_link(app->page_links); + app->page_links = NULL; + + if (app->doctitle) + fz_free(app->doctitle); + app->doctitle = NULL; + if (app->cache) fz_free_glyph_cache(app->cache); app->cache = NULL; |