Package: geoip
Severity: minor
Tags: patch

Free GeoIPRecord after use in geoiplookup.c, similar to GeoIPRegion a
few lines above. This doesn't actually matter much as the program
terminates right after that, but it's good behaviour to clean up
after oneself. :-)


-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (x86_64)

Kernel: Linux 2.6.32.7-orbiter.x86-64.1 (PREEMPT)
Locale: LANG=pl_PL.UTF-8, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
diff -ru old/geoip-1.4.6.dfsg/apps/geoiplookup.c geoip-1.4.6.dfsg/apps/geoiplookup.c
--- old/geoip-1.4.6.dfsg/apps/geoiplookup.c	2009-12-15 13:21:28.000000000 +0100
+++ geoip-1.4.6.dfsg/apps/geoiplookup.c	2009-12-15 13:16:42.974026407 +0100
@@ -177,6 +177,7 @@
 			else {
 				printf("%s: %s, %s, %s, %s, %f, %f\n", GeoIPDBDescription[i], gir->country_code, _mk_NA(gir->region),
 				       _mk_NA(gir->city), _mk_NA(gir->postal_code), gir->latitude, gir->longitude);
+				GeoIPRecord_delete(gir);
 			}
 		}
 		else if (GEOIP_CITY_EDITION_REV1 == i) {
@@ -187,6 +188,7 @@
 			else {
 				printf("%s: %s, %s, %s, %s, %f, %f, %d, %d\n", GeoIPDBDescription[i], gir->country_code, _mk_NA(gir->region), _mk_NA(gir->city), _mk_NA(gir->postal_code),
 				       gir->latitude, gir->longitude, gir->metro_code, gir->area_code);
+				GeoIPRecord_delete(gir);
 			}
 		}
 		else if (GEOIP_ORG_EDITION == i || GEOIP_ISP_EDITION == i || GEOIP_ASNUM_EDITION == i) {

Reply via email to