From a78618eae9d21783a17858ad7f0ea5ba21f39e90 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Fri, 24 Mar 2017 17:24:45 -0400 Subject: Fix needs_reap entry in key storable. There is no need to hold a separate flag to say that we need reaping, when this can be implied from the store_key_refs and the normal refcount being equal. In addition, I don't think we were ever actually setting this, so the code was wrong to start with. --- source/fitz/image.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source') diff --git a/source/fitz/image.c b/source/fitz/image.c index 3b0a93d6..9e7717d6 100644 --- a/source/fitz/image.c +++ b/source/fitz/image.c @@ -92,8 +92,9 @@ static int fz_needs_reap_image_key(fz_context *ctx, void *key_) { fz_image_key *key = (fz_image_key *)key_; + fz_key_storable *ks = &key->image->key_storable; - return (key->image->key_storable.needs_reaping); + return (ks->store_key_refs == ks->storable.refs); } static const fz_store_type fz_image_store_type = -- cgit v1.2.3