diff options
author | Robin Watts <robin.watts@artifex.com> | 2012-01-20 11:54:02 +0000 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2012-01-20 16:55:41 +0000 |
commit | 8e59740d3ac9e6cdcc08baf1745f0808f2dc9df5 (patch) | |
tree | 8f14c985ab7e29e932b3c226e0754a6b6943594f /fitz/res_store.c | |
parent | 33d225213dac1217a86c00d0e8e8ca6d7503cbb2 (diff) | |
download | mupdf-8e59740d3ac9e6cdcc08baf1745f0808f2dc9df5.tar.xz |
Fix locking problems.
Thanks to filmor's help, fix some problems where locking was going
wrong; in 2 cases we failed to unlock, and in 2 cases we tried to
free (which relocks) while already locked.
All simple fixes.
Diffstat (limited to 'fitz/res_store.c')
-rw-r--r-- | fitz/res_store.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fitz/res_store.c b/fitz/res_store.c index 93d48272..3ee910cc 100644 --- a/fitz/res_store.c +++ b/fitz/res_store.c @@ -196,8 +196,8 @@ fz_store_item(fz_context *ctx, fz_obj *key, void *val_, unsigned int itemsize) size = store->size + itemsize; if (store->max != FZ_STORE_UNLIMITED && size > store->max && ensure_space(ctx, size - store->max)) { - fz_free(ctx, item); fz_unlock(ctx); + fz_free(ctx, item); return; } store->size += itemsize; @@ -220,8 +220,8 @@ fz_store_item(fz_context *ctx, fz_obj *key, void *val_, unsigned int itemsize) } fz_catch(ctx) { - fz_free(ctx, item); fz_unlock(ctx); + fz_free(ctx, item); return; } } |