]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
location-functions.pl: Remove accidently keept 2nd DB init call.
authorStefan Schantl <stefan.schantl@ipfire.org>
Wed, 2 Dec 2020 14:04:08 +0000 (15:04 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 2 Dec 2020 14:16:54 +0000 (14:16 +0000)
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 <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/cfgroot/location-functions.pl

index b7465c5ef08a72fe9de2cddf28f435a3f9e3de00..fb97eb5892731810050434ca23b8971bdb815682 100644 (file)
@@ -163,9 +163,6 @@ sub get_full_country_name($) {
                # Grab location name from hash.
                $name = $not_iso_3166_location{$code};
        } else {
-               # Init libloc database connection.
-               my $db_handle = &init();
-
                # Get the country name by using the location module.
                $name = &Location::get_country_name($db_handle, $code);
        }