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

Side by Side 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, 7 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 // Original code is licensed as follows: 6 // Original code is licensed as follows:
7 /* 7 /*
8 * Copyright 2007 ZXing authors 8 * Copyright 2007 ZXing authors
9 * 9 *
10 * Licensed under the Apache License, Version 2.0 (the "License"); 10 * Licensed under the Apache License, Version 2.0 (the "License");
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 CFX_ByteString bs = Decode(&bitmap, hints, e); 86 CFX_ByteString bs = Decode(&bitmap, hints, e);
87 BC_EXCEPTION_CHECK_ReturnValue(e, ""); 87 BC_EXCEPTION_CHECK_ReturnValue(e, "");
88 return bs; 88 return bs;
89 } 89 }
90 CFX_ByteString CBC_QRCodeReader::Decode(CBC_BinaryBitmap* image, int32_t& e) { 90 CFX_ByteString CBC_QRCodeReader::Decode(CBC_BinaryBitmap* image, int32_t& e) {
91 CFX_ByteString bs = Decode(image, 0, e); 91 CFX_ByteString bs = Decode(image, 0, e);
92 BC_EXCEPTION_CHECK_ReturnValue(e, ""); 92 BC_EXCEPTION_CHECK_ReturnValue(e, "");
93 return bs; 93 return bs;
94 } 94 }
95 void CBC_QRCodeReader::ReleaseAll() { 95 void CBC_QRCodeReader::ReleaseAll() {
96 if (CBC_ReedSolomonGF256::QRCodeFild) { 96 delete CBC_ReedSolomonGF256::QRCodeFild;
97 delete CBC_ReedSolomonGF256::QRCodeFild; 97 CBC_ReedSolomonGF256::QRCodeFild = nullptr;
98 CBC_ReedSolomonGF256::QRCodeFild = NULL; 98 delete CBC_ReedSolomonGF256::DataMatrixField;
99 } 99 CBC_ReedSolomonGF256::DataMatrixField = nullptr;
100 if (CBC_ReedSolomonGF256::DataMatrixField) {
101 delete CBC_ReedSolomonGF256::DataMatrixField;
102 CBC_ReedSolomonGF256::DataMatrixField = NULL;
103 }
104 CBC_QRCoderMode::Destroy(); 100 CBC_QRCoderMode::Destroy();
105 CBC_QRCoderErrorCorrectionLevel::Destroy(); 101 CBC_QRCoderErrorCorrectionLevel::Destroy();
106 CBC_QRDataMask::Destroy(); 102 CBC_QRDataMask::Destroy();
107 CBC_QRCoderVersion::Destroy(); 103 CBC_QRCoderVersion::Destroy();
108 } 104 }
OLDNEW
« 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