summaryrefslogtreecommitdiff
path: root/fitz/doc_link.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2012-02-03 16:48:47 +0100
committerTor Andersson <tor.andersson@artifex.com>2012-02-03 16:48:47 +0100
commite1016a6c646b3b92f23bea1f0aa959f0ae0b3359 (patch)
treece1861fa120ea5a589bc97c91791d34c8d042e88 /fitz/doc_link.c
parentf262a8c0bfae0cd90c2cd29acd409baf2157c241 (diff)
downloadmupdf-e1016a6c646b3b92f23bea1f0aa959f0ae0b3359.tar.xz
Fix NULL dereference when freeing fz_link objects.
Diffstat (limited to 'fitz/doc_link.c')
-rw-r--r--fitz/doc_link.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fitz/doc_link.c b/fitz/doc_link.c
index c9065f24..71f5dfbf 100644
--- a/fitz/doc_link.c
+++ b/fitz/doc_link.c
@@ -55,7 +55,7 @@ fz_keep_link(fz_context *ctx, fz_link *link)
void
fz_drop_link(fz_context *ctx, fz_link *link)
{
- if (--link->refs == 0)
+ if (link && --link->refs == 0)
{
fz_drop_link(ctx, link->next);
fz_free_link_dest(ctx, &link->dest);