From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCH] location-functions.pl: Remove accidently keept 2nd DB init call. Date: Wed, 02 Dec 2020 15:04:08 +0100 Message-ID: <20201202140408.6706-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1445783154762406756==" List-Id: --===============1445783154762406756== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The get_full_country_name() function had an accidenlty and not longer required call of the DB init function. This is a waste of memory and a known problem, especially on systems with less than 1GB of RAM, where the application which uses libloc in such a redundant way crashes. Signed-off-by: Stefan Schantl --- config/cfgroot/location-functions.pl | 3 --- 1 file changed, 3 deletions(-) diff --git a/config/cfgroot/location-functions.pl b/config/cfgroot/location-f= unctions.pl index b7465c5ef..fb97eb589 100644 --- a/config/cfgroot/location-functions.pl +++ b/config/cfgroot/location-functions.pl @@ -163,9 +163,6 @@ sub get_full_country_name($) { # Grab location name from hash. $name =3D $not_iso_3166_location{$code}; } else { - # Init libloc database connection. - my $db_handle =3D &init(); - # Get the country name by using the location module. $name =3D &Location::get_country_name($db_handle, $code); } --=20 2.20.1 --===============1445783154762406756==--