summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/fpdf_attachment.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/fpdfsdk/fpdf_attachment.cpp b/fpdfsdk/fpdf_attachment.cpp
index f3c1c83cf9..7bc168025a 100644
--- a/fpdfsdk/fpdf_attachment.cpp
+++ b/fpdfsdk/fpdf_attachment.cpp
@@ -27,12 +27,10 @@ namespace {
constexpr char kChecksumKey[] = "CheckSum";
ByteString CFXByteStringHexDecode(const ByteString& bsHex) {
- uint8_t* result = nullptr;
+ std::unique_ptr<uint8_t, FxFreeDeleter> result;
uint32_t size = 0;
HexDecode(bsHex.AsRawSpan(), &result, &size);
- ByteString bsDecoded(result, size);
- FX_Free(result);
- return bsDecoded;
+ return ByteString(result.get(), size);
}
ByteString GenerateMD5Base16(const void* contents, const unsigned long len) {