diff --git a/acountry.c b/acountry.c index 210ef84a..fae9f9fe 100644 --- a/acountry.c +++ b/acountry.c @@ -562,6 +562,7 @@ static void find_country_from_cname(const char *cname, struct in_addr addr) if ((z0 != 'z' && z1 != 'z') || dot != cname+4) { printf("Unexpected CNAME %s (ver_1)\n", cname); + free(ccopy); return; } } @@ -572,12 +573,14 @@ static void find_country_from_cname(const char *cname, struct in_addr addr) if (z0 != 'z' && z1 != 'z') { printf("Unexpected CNAME %s (ver_2)\n", cname); + free(ccopy); return; } } else { printf("Unexpected CNAME %s (ver?)\n", cname); + free(ccopy); return; }