]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix RADIUS helper resource leak
authorAmos Jeffries <squid3@treenet.co.nz>
Mon, 13 Jun 2011 11:49:25 +0000 (23:49 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Mon, 13 Jun 2011 11:49:25 +0000 (23:49 +1200)
cppcheck detected the config file was never closed/released. This could
prevent the helper shutting down cleanly.

helpers/basic_auth/RADIUS/basic_radius_auth.cc

index cdbf94e3657b10f80e52446a8cda4a605f2b504a..c52f9043b1ecf2411b44decc0bdfaae9773f6a91 100644 (file)
@@ -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;