ldap_fdw segfaults with EXPLAIN ONLY

I've just added an if() to not try to freemem not initialized, maybe there is a better solution.