about summary refs log tree commit diff
path: root/converter/other/jpeg2000/libjasper/base/jas_stream.c
diff options
context:
space:
mode:
Diffstat (limited to 'converter/other/jpeg2000/libjasper/base/jas_stream.c')
-rw-r--r--converter/other/jpeg2000/libjasper/base/jas_stream.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/converter/other/jpeg2000/libjasper/base/jas_stream.c b/converter/other/jpeg2000/libjasper/base/jas_stream.c
index 16c948eb..24f835ed 100644
--- a/converter/other/jpeg2000/libjasper/base/jas_stream.c
+++ b/converter/other/jpeg2000/libjasper/base/jas_stream.c
@@ -414,9 +414,11 @@ jas_stream_t *jas_stream_tmpfile()
         if (rc == 0) {
             pm_setjmpbuf(&jmpbuf);
             *obj = pm_tmpfile_fd();
+            pm_setjmpbuf(NULL);
         } else {
             /* pm_tmpfile_fd() threw an error */
             jas_stream_destroy(stream);
+            pm_setjmpbuf(NULL);
             return 0;
         }
     }