summaryrefslogtreecommitdiff
path: root/core/fpdfapi
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-08-23 23:47:03 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-08-23 23:47:03 +0000
commitc1dde5d9b3da2af6e6f81df09ed41ab9c34bbde4 (patch)
tree74a361473c5f8b3044ab3f17e72f784edb72db4b /core/fpdfapi
parenta41801ee0e7c0d76feca2dfe20103d8b82391026 (diff)
downloadpdfium-c1dde5d9b3da2af6e6f81df09ed41ab9c34bbde4.tar.xz
Pass unique_ptr<> to CFX_MemoryStream constructor
Proves we own the memory that the class will eventually free. Change-Id: Ie9523da8db738e7478a1c73e3e1a6b24aed38442 Reviewed-on: https://pdfium-review.googlesource.com/41290 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fpdfapi')
-rw-r--r--core/fpdfapi/parser/cpdf_object_stream.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/fpdfapi/parser/cpdf_object_stream.cpp b/core/fpdfapi/parser/cpdf_object_stream.cpp
index d6b3d365f6..7e4b4ae81c 100644
--- a/core/fpdfapi/parser/cpdf_object_stream.cpp
+++ b/core/fpdfapi/parser/cpdf_object_stream.cpp
@@ -97,7 +97,7 @@ void CPDF_ObjectStream::Init(const CPDF_Stream* stream) {
stream_acc->LoadAllDataFiltered();
const uint32_t data_size = stream_acc->GetSize();
data_stream_ = pdfium::MakeRetain<CFX_MemoryStream>(
- stream_acc->DetachData().release(), data_size);
+ stream_acc->DetachData(), data_size);
}
CPDF_SyntaxParser syntax(data_stream_);