summaryrefslogtreecommitdiffstats
path: root/include/qpdf/ClosedFileInputSource.hh
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2019-06-22 20:24:49 +0200
committerJay Berkenbilt <ejb@ql.org>2019-06-22 22:57:52 +0200
commit6c39aa87638f7a6f96a97627ac112fb2022bd3a7 (patch)
tree6941498e1cacbd6dcade4a695b27085fa693984f /include/qpdf/ClosedFileInputSource.hh
parent12400475283f5081ea55f52a764e43f14032f6ba (diff)
downloadqpdf-6c39aa87638f7a6f96a97627ac112fb2022bd3a7.tar.zst
In shippable code, favor smart pointers (fixes #235)
Use PointerHolder in several places where manually memory allocation and deallocation were being used. This helps to protect against memory leaks when exceptions are thrown in surprising places.
Diffstat (limited to 'include/qpdf/ClosedFileInputSource.hh')
-rw-r--r--include/qpdf/ClosedFileInputSource.hh2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/qpdf/ClosedFileInputSource.hh b/include/qpdf/ClosedFileInputSource.hh
index ee8557fc..09b63bbd 100644
--- a/include/qpdf/ClosedFileInputSource.hh
+++ b/include/qpdf/ClosedFileInputSource.hh
@@ -82,7 +82,7 @@ class ClosedFileInputSource: public InputSource
std::string filename;
qpdf_offset_t offset;
- FileInputSource* fis;
+ PointerHolder<FileInputSource> fis;
bool stay_open;
};
PointerHolder<Members> m;