Only fetch the sshPublicKey attribute.
Fix potential memory leak.

The man page for ldap_search_ext_s states that the res parameter should
be freed with ldap_msgfree() regardless of the return value of the
function.
Remove unused label.