diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2012-08-04 19:34:44 +0200 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2012-08-06 13:59:25 +0200 |
commit | d44c98001b404a18ccc9d219976b9f32c28922c3 (patch) | |
tree | 4206d9f0ac1d0fbe3557368aff25625042daa56c | |
parent | 0df1f84bd59e94798a09b55aac1d7cba40be60d0 (diff) | |
download | mupdf-d44c98001b404a18ccc9d219976b9f32c28922c3.tar.xz |
Set refs to NULL in pdf repair so object are not freed
-rw-r--r-- | pdf/pdf_repair.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pdf/pdf_repair.c b/pdf/pdf_repair.c index bbe70a2a..e892bc52 100644 --- a/pdf/pdf_repair.c +++ b/pdf/pdf_repair.c @@ -453,11 +453,13 @@ pdf_repair_xref(pdf_document *xref, pdf_lexbuf *buf) { pdf_dict_puts(xref->trailer, "Root", root); pdf_drop_obj(root); + root = NULL; } if (info) { pdf_dict_puts(xref->trailer, "Info", info); pdf_drop_obj(info); + info = NULL; } if (encrypt) @@ -471,6 +473,7 @@ pdf_repair_xref(pdf_document *xref, pdf_lexbuf *buf) } pdf_dict_puts(xref->trailer, "Encrypt", encrypt); pdf_drop_obj(encrypt); + encrypt = NULL; } if (id) |