Free temporary variable in error path

Fix Coverity CID 56890

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
pull/25/head
Gregor Jasny 10 years ago committed by David Drysdale
parent 7db1afd38f
commit bd2c61353f
  1. 3
      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;
}

Loading…
Cancel
Save