From: Alex Rousskov Date: Fri, 23 Sep 2016 00:13:32 +0000 (-0600) Subject: Do not leak url_rewrite_extras and store_id_extras on reconfigure/shutdown. X-Git-Tag: SQUID_4_0_15~24 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=783383841f289872bc23dbb9d52229f67ed79209;p=thirdparty%2Fsquid.git Do not leak url_rewrite_extras and store_id_extras on reconfigure/shutdown. TODO: We should not create unneeded extras either. --- diff --git a/src/redirect.cc b/src/redirect.cc index 5098283528..619f987532 100644 --- a/src/redirect.cc +++ b/src/redirect.cc @@ -395,11 +395,13 @@ redirectInit(void) } if (Config.redirector_extras) { + delete redirectorExtrasFmt; redirectorExtrasFmt = new ::Format::Format("url_rewrite_extras"); (void)redirectorExtrasFmt->parse(Config.redirector_extras); } if (Config.storeId_extras) { + delete storeIdExtrasFmt; storeIdExtrasFmt = new ::Format::Format("store_id_extras"); (void)storeIdExtrasFmt->parse(Config.storeId_extras); } @@ -414,9 +416,6 @@ redirectShutdown(void) * When and if needed for more helpers a separated shutdown * method will be added for each of them. */ - if (!storeIds && !redirectors) - return; - if (redirectors) helperShutdown(redirectors);