The problem was found by code scan. Use delete safe iteration instead.
Summary of changes
This pull request includes following changes or fixes.
Fix of issue #457
Description
The CodeQL on the GitHub found three potential use after free issues. All are same flavor, it
means, use a pointer after free. So change the logic from normal iteration to delete safe iteration.
This fix might be good to merge to the v2.4-stable branch also.
Fixes #457
Type of change
Bug fix (non-breaking change which fixes an issue)
Checklist:
[X] My code follows the style guidelines of this project
[X] I have performed a self-review of my own code
[X] I have commented my code, particularly in hard-to-understand areas
[X] I have made corresponding changes to the documentation
[X] My changes generate no new warnings
[X] I have confirmed my fix is effective or that my feature works
The problem was found by code scan. Use delete safe iteration instead.
Summary of changes
This pull request includes following changes or fixes.
Description
The CodeQL on the GitHub found three
potential use after free
issues. All are same flavor, it means, use a pointer after free. So change the logic from normal iteration to delete safe iteration.This fix might be good to merge to the
v2.4-stable
branch also.Fixes #457
Type of change
Checklist: