Blame SOURCES/0001-fix-segfault-in-env-without-libmaxmind.so.patch

fe1d07
From 2978e6afd68b1e028855e9166af6eff47eb60f41 Mon Sep 17 00:00:00 2001
fe1d07
From: Martin Sehnoutka <msehnout@redhat.com>
fe1d07
Date: Fri, 3 Aug 2018 10:48:12 +0200
fe1d07
Subject: [PATCH] fix segfault in env without libmaxmind.so
fe1d07
fe1d07
---
fe1d07
 ipcalc-maxmind.c | 3 +++
fe1d07
 1 file changed, 3 insertions(+)
fe1d07
fe1d07
diff --git a/ipcalc-maxmind.c b/ipcalc-maxmind.c
fe1d07
index bb4f495..6f0033b 100644
fe1d07
--- a/ipcalc-maxmind.c
fe1d07
+++ b/ipcalc-maxmind.c
fe1d07
@@ -113,6 +113,9 @@ void geo_ip_lookup(const char *ip, char **country, char **ccode, char **city, ch
fe1d07
     int gai_error, mmdb_error, status, coordinates=0;
fe1d07
     double latitude, longitude;
fe1d07
 
fe1d07
+    if (geo_setup() != 0)
fe1d07
+        return;
fe1d07
+
fe1d07
     /* Open the system maxmind database with countries */
fe1d07
     status = pMMDB_open(MAXMINDDB_LOCATION_COUNTRY, MMDB_MODE_MMAP, &mmdb);
fe1d07
     if (MMDB_SUCCESS == status) {
fe1d07
-- 
fe1d07
2.17.1
fe1d07