[GitHub] [xerces-c] theta682 commented on a change in pull request #47: [XERCESC-2188] Fix potential double-free in usage of ReaderMgr::pushReader()

GitBox <[email protected]>
Newsgroups gmane.text.xml.xerces-c.devel
Message-ID <[email protected]>
theta682 commented on a change in pull request #47:
URL: https://github.com/apache/xerces-c/pull/47#discussion_r792337283



##########
File path: src/xercesc/internal/ReaderMgr.cpp
##########
@@ -72,8 +72,9 @@ ReaderMgr::~ReaderMgr()
     //  entities it still references!)
     //
     delete fCurReader;
+    if (fOwnEntity)
+        delete fCurEntity;

Review comment:
       `delete` checks for `nullptr`
   ```suggestion
       delete fCurEntity;
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.