summaryrefslogtreecommitdiff
path: root/xfa/fxbarcode/qrcode/BC_QRCodeReader.cpp
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-04-28 17:29:19 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-28 17:29:19 -0700
commit495bda110a6ea8e7a6fc313ec0232a9ca6e3cfdc (patch)
tree42abda300274f81009bdb9866e0f7e3f81164726 /xfa/fxbarcode/qrcode/BC_QRCodeReader.cpp
parenta31098417852bdf13e693a6e0913e0706cf94098 (diff)
downloadpdfium-495bda110a6ea8e7a6fc313ec0232a9ca6e3cfdc.tar.xz
Do not check pointers before deleting them.
XFA edition. Review-Url: https://codereview.chromium.org/1925363002
Diffstat (limited to 'xfa/fxbarcode/qrcode/BC_QRCodeReader.cpp')
-rw-r--r--xfa/fxbarcode/qrcode/BC_QRCodeReader.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/xfa/fxbarcode/qrcode/BC_QRCodeReader.cpp b/xfa/fxbarcode/qrcode/BC_QRCodeReader.cpp
index 716b6c17de..fc87785d5c 100644
--- a/xfa/fxbarcode/qrcode/BC_QRCodeReader.cpp
+++ b/xfa/fxbarcode/qrcode/BC_QRCodeReader.cpp
@@ -93,14 +93,10 @@ CFX_ByteString CBC_QRCodeReader::Decode(CBC_BinaryBitmap* image, int32_t& e) {
return bs;
}
void CBC_QRCodeReader::ReleaseAll() {
- if (CBC_ReedSolomonGF256::QRCodeFild) {
- delete CBC_ReedSolomonGF256::QRCodeFild;
- CBC_ReedSolomonGF256::QRCodeFild = NULL;
- }
- if (CBC_ReedSolomonGF256::DataMatrixField) {
- delete CBC_ReedSolomonGF256::DataMatrixField;
- CBC_ReedSolomonGF256::DataMatrixField = NULL;
- }
+ delete CBC_ReedSolomonGF256::QRCodeFild;
+ CBC_ReedSolomonGF256::QRCodeFild = nullptr;
+ delete CBC_ReedSolomonGF256::DataMatrixField;
+ CBC_ReedSolomonGF256::DataMatrixField = nullptr;
CBC_QRCoderMode::Destroy();
CBC_QRCoderErrorCorrectionLevel::Destroy();
CBC_QRDataMask::Destroy();