autofs-5.1.1 - fix use after free in match_my_name()

From: Ian Kent <raven@themaw.net>

I can't remember now if this function is supposed to fail if any host
address has no reverse mapping. Presumably I put in the "goto next;"
for a reason so just remove the freeaddrinfo() call.

Signed-off-by: Ian Kent <raven@themaw.net>
---
 CHANGELOG           |    1 +
 modules/parse_amd.c |    2 --
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG
index 9d8096e..88ec577 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -39,6 +39,7 @@
 - fix use after free in open_lookup().
 - fix typo in autofs_sasl_bind().
 - fix memory leak in get_network_proximity().
+- fix use after free in match_my_name().
 
 21/04/2015 autofs-5.1.1
 =======================
diff --git a/modules/parse_amd.c b/modules/parse_amd.c
index b8e0078..38d76b8 100644
--- a/modules/parse_amd.c
+++ b/modules/parse_amd.c
@@ -285,7 +285,6 @@ static int match_my_name(unsigned int logopt, const char *name, struct substvar
 			error(logopt,
 			      "host address info lookup failed: %s\n",
 			      gai_strerror(ret));
-			freeaddrinfo(cni);
 			goto next;
 		}
 
@@ -296,7 +295,6 @@ static int match_my_name(unsigned int logopt, const char *name, struct substvar
 			error(logopt,
 			      "host address info lookup failed: %s\n",
 			      gai_strerror(ret));
-			freeaddrinfo(cni);
 			goto next;
 		}