diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2016-10-11 20:39:26 +0800 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2016-10-18 21:25:10 +0800 |
commit | 23ac569165b66403abfe72e89007675ceaa9bde0 (patch) | |
tree | af9f03148079f3ac564bc8f6d7c007c16cf8f444 /source/xps/xps-resource.c | |
parent | 6dcf860ef683ab416151913150790e61ff26c1b8 (diff) | |
download | mupdf-23ac569165b66403abfe72e89007675ceaa9bde0.tar.xz |
Avoid checking argument to fz_drop_*()/fz_free().
As fz_drop_*()/fz_free() all must handle NULL.
Diffstat (limited to 'source/xps/xps-resource.c')
-rw-r--r-- | source/xps/xps-resource.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source/xps/xps-resource.c b/source/xps/xps-resource.c index a625d13b..f12a465d 100644 --- a/source/xps/xps-resource.c +++ b/source/xps/xps-resource.c @@ -145,10 +145,8 @@ xps_drop_resource_dictionary(fz_context *ctx, xps_document *doc, xps_resource *d while (dict) { next = dict->next; - if (dict->base_xml) - fz_drop_xml(ctx, dict->base_xml); - if (dict->base_uri) - fz_free(ctx, dict->base_uri); + fz_drop_xml(ctx, dict->base_xml); + fz_free(ctx, dict->base_uri); fz_free(ctx, dict); dict = next; } |