Ignore:
Timestamp:
Feb 24, 2011, 11:25:27 AM (14 years ago)
Author:
[email protected]
Message:

2011-02-24 Michael Saboff <[email protected]>

Reviewed by Oliver Hunt.

PatternAlternative leaked in YarrPatternConstructor::atomParenthesesEnd()
https://bugs.webkit.org/show_bug.cgi?id=55156

Added code to delete unneeded PatternAlternative after it is removed
from m_alternatives Vector.

  • yarr/YarrPattern.cpp: (JSC::Yarr::YarrPatternConstructor::atomParenthesesEnd):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/yarr/YarrPattern.cpp

    r76502 r79594  
    496496        for (unsigned i = 0; i < numParenAlternatives; i++) {
    497497            if (!parenthesesDisjunction->m_alternatives[i]->m_terms.size() && numParenAlternatives > 1) {
     498                PatternAlternative* altToRemove = parenthesesDisjunction->m_alternatives[i];
    498499                parenthesesDisjunction->m_alternatives.remove(i);
     500                delete altToRemove;
    499501                --numParenAlternatives;
    500502
Note: See TracChangeset for help on using the changeset viewer.