aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QUtil.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libqpdf/QUtil.cc')
-rw-r--r--libqpdf/QUtil.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/libqpdf/QUtil.cc b/libqpdf/QUtil.cc
index 503d79f9..1f179fd5 100644
--- a/libqpdf/QUtil.cc
+++ b/libqpdf/QUtil.cc
@@ -735,9 +735,7 @@ QUtil::copy_string(std::string const& str)
std::shared_ptr<char>
QUtil::make_shared_cstr(std::string const& str)
{
- auto result = std::shared_ptr<char>(
- new char[str.length() + 1],
- std::default_delete<char[]>());
+ auto result = QUtil::make_shared_array<char>(str.length() + 1);
// Use memcpy in case string contains nulls
result.get()[str.length()] = '\0';
memcpy(result.get(), str.c_str(), str.length());