Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(234)

Unified Diff: xfa/fxbarcode/qrcode/BC_QRCodeReader.cpp

Issue 1925363002: Do not check pointers before deleting them. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fxbarcode/pdf417/BC_PDF417ECErrorCorrection.cpp ('k') | xfa/fxfa/app/xfa_ffdocview.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxbarcode/qrcode/BC_QRCodeReader.cpp
diff --git a/xfa/fxbarcode/qrcode/BC_QRCodeReader.cpp b/xfa/fxbarcode/qrcode/BC_QRCodeReader.cpp
index 716b6c17de79aac7b732b4cb67546e7a68898ff2..fc87785d5c652afde1220ea92971be546fc0ae69 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();
« no previous file with comments | « xfa/fxbarcode/pdf417/BC_PDF417ECErrorCorrection.cpp ('k') | xfa/fxfa/app/xfa_ffdocview.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698