diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2020-07-18 03:02:46 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2020-07-18 03:02:46 +0000 |
commit | 1039639b6e79f17f14c04253b0f29ef6a4c1e2fe (patch) | |
tree | 4af6cd2d92a00a1cfd4615cf3a0d031af4cdd822 /Build/source/texk/dvipdfm-x/pdfximage.c | |
parent | 28e39c306555c3712bccbf8032c7ff0813de6c6a (diff) |
Fix a bug that error cleanup routine can be called recursively (S. Hirata).
git-svn-id: svn://tug.org/texlive/trunk@55865 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipdfm-x/pdfximage.c')
-rw-r--r-- | Build/source/texk/dvipdfm-x/pdfximage.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Build/source/texk/dvipdfm-x/pdfximage.c b/Build/source/texk/dvipdfm-x/pdfximage.c index ef6282e80ad..be8e9a4da55 100644 --- a/Build/source/texk/dvipdfm-x/pdfximage.c +++ b/Build/source/texk/dvipdfm-x/pdfximage.c @@ -1056,3 +1056,20 @@ static int check_for_mp (FILE *image_file) return ((try_count > 0) ? 1 : 0); } + +/* ERROR() can't be used here otherwise the cleanup routine is recursively called. */ +#undef ERROR +void +pdf_error_cleanup_cache (void) +{ + struct ic_ *ic = &_ic; + int i; + pdf_ximage *I; + + for (i = 0; i < ic->count; i++) { + I = &ic->ximages[i]; + if (I->attr.tempfile) { + dpx_delete_temp_file(I->filename, false); /* temporary filename freed here */ + } + } +} |