From: Amos Jeffries Date: Sat, 3 Aug 2013 04:24:06 +0000 (+1200) Subject: Fix memory leak in refresh_pattern parsing X-Git-Tag: SQUID_3_5_0_1~672 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=eeaa522f608a620cffe3f779ed546bb6961d6116;p=thirdparty%2Fsquid.git Fix memory leak in refresh_pattern parsing Occurs when refresh_pattern is configure with invalid regex pattern. Detected by Coverity Scan. Issue 1058882. --- diff --git a/src/cache_cf.cc b/src/cache_cf.cc index 521c9dd5f5..885008db17 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -2899,6 +2899,7 @@ parse_refreshpattern(RefreshPattern ** head) regerror(errcode, &comp, errbuf, sizeof errbuf); debugs(22, DBG_CRITICAL, "" << cfg_filename << " line " << config_lineno << ": " << config_input_line); debugs(22, DBG_CRITICAL, "refreshAddToList: Invalid regular expression '" << pattern << "': " << errbuf); + xfree(pattern); return; }