| Index: core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
|
| diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
|
| index ff14a984bd011602cb504af059e56da0d0034f28..7482f0b8e4fc12427b49cdc9752ad5003771310a 100644
|
| --- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
|
| +++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
|
| @@ -2376,8 +2376,9 @@ CPDF_Object* CPDF_SyntaxParser::GetObjectByStrict(
|
| continue;
|
| }
|
| key = PDF_NameDecode(key);
|
| - CPDF_Object* pObj = GetObject(pObjList, objnum, gennum);
|
| - if (pObj == NULL) {
|
| + nonstd::unique_ptr<CPDF_Object, ReleaseDeleter<CPDF_Object>> obj(
|
| + GetObject(pObjList, objnum, gennum));
|
| + if (!obj) {
|
| if (pDict) {
|
| pDict->Release();
|
| }
|
| @@ -2394,7 +2395,7 @@ CPDF_Object* CPDF_SyntaxParser::GetObjectByStrict(
|
| }
|
| if (key.GetLength() > 1) {
|
| pDict->AddValue(CFX_ByteStringC(key.c_str() + 1, key.GetLength() - 1),
|
| - pObj);
|
| + obj.release());
|
| }
|
| }
|
| if (pContext) {
|
|
|