From: Alex Rousskov Date: Fri, 23 Sep 2016 11:22:48 +0000 (+1200) Subject: Do not leak url_rewrite_extras and store_id_extras on reconfigure/shutdown. X-Git-Tag: SQUID_3_5_22~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=83401fc2a3595682bdcbe57a941af973ddd39a15;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 d28a910a98..5fb6913c4b 100644 --- a/src/redirect.cc +++ b/src/redirect.cc @@ -369,11 +369,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); } @@ -388,9 +390,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);