diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2011-09-13 16:23:20 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2011-09-13 16:23:20 +0200 |
commit | 836c46623ca94c94f2a9118492f163ad1424a267 (patch) | |
tree | e7392ea38e2ffe2ec1a962266e41d8b3b151a4bc /apt-pkg | |
parent | b3bbe1cffee0f65c8b9bc2f1263a35deeec9728b (diff) |
* cherry pick r1825 from lp:~mvo/apt/mvo:
* apt-pkg/contrib/configuration.cc:
- fix double delete (LP: #848907)
- ignore only the invalid regexp instead of all options
Diffstat (limited to 'apt-pkg')
-rw-r--r-- | apt-pkg/contrib/configuration.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/apt-pkg/contrib/configuration.cc b/apt-pkg/contrib/configuration.cc index ece05e8f6..2db191ba2 100644 --- a/apt-pkg/contrib/configuration.cc +++ b/apt-pkg/contrib/configuration.cc @@ -870,10 +870,10 @@ Configuration::MatchAgainstConfig::MatchAgainstConfig(char const * Config) { regfree(p); delete p; - clearPatterns(); - _error->Warning("Regex compilation error for '%s' in configuration option '%s'", - s->c_str(), Config); - return; + _error->Warning("Invalid regular expression '%s' in configuration " + "option '%s' will be ignored.", + s->c_str(), Config); + continue; } } if (strings.size() == 0) @@ -894,6 +894,7 @@ void Configuration::MatchAgainstConfig::clearPatterns() regfree(*p); delete *p; } + patterns.clear(); } /*}}}*/ // MatchAgainstConfig::Match - returns true if a pattern matches /*{{{*/ |