From: Amos Jeffries Date: Mon, 13 Jun 2011 11:49:25 +0000 (+1200) Subject: Fix RADIUS helper resource leak X-Git-Tag: take08~55^2~140 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=32ae6cdef200f4f7b514156c4b6debb8ace0db41;p=thirdparty%2Fsquid.git Fix RADIUS helper resource leak cppcheck detected the config file was never closed/released. This could prevent the helper shutting down cleanly. --- diff --git a/helpers/basic_auth/RADIUS/basic_radius_auth.cc b/helpers/basic_auth/RADIUS/basic_radius_auth.cc index cdbf94e365..c52f9043b1 100644 --- a/helpers/basic_auth/RADIUS/basic_radius_auth.cc +++ b/helpers/basic_auth/RADIUS/basic_radius_auth.cc @@ -251,6 +251,7 @@ rad_auth_config(const char *cfname) if (!memcmp(line, "port", 4)) sscanf(line, "port %s", svc_name); } + fclose(cf); if (srv && crt) return 0; return -1;