autofs-5.1.0 - init qdn before use in get_query_dn()

From: Ian Kent <ikent@redhat.com>

Ensure qdn is initialized before use in case there's garbage in it.
---
 CHANGELOG             |    1 +
 modules/lookup_ldap.c |    2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG b/CHANGELOG
index 28e6355..bcd6a56 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -36,6 +36,7 @@
 - dont pass sloppy option for other than nfs mounts.
 - make service want network-online.
 - fix fix master map type check.
+- init qdn before use in get_query_dn().
 
 04/06/2014 autofs-5.1.0
 =======================
diff --git a/modules/lookup_ldap.c b/modules/lookup_ldap.c
index ac2ef30..5da613e 100644
--- a/modules/lookup_ldap.c
+++ b/modules/lookup_ldap.c
@@ -335,7 +335,7 @@ LDAP *init_ldap_connection(unsigned logopt, const char *uri, struct lookup_conte
 static int get_query_dn(unsigned logopt, LDAP *ldap, struct lookup_context *ctxt, const char *class, const char *key)
 {
 	char buf[MAX_ERR_BUF];
-	char *query, *dn, *qdn;
+	char *query, *dn, *qdn = NULL;
 	LDAPMessage *result = NULL, *e;
 	char *attrs[2];
 	struct berval **value;
