Fix for bug#40875: Memory leak in FEDERATED handler
Fix for bug#40875: Memory leak in FEDERATED handler

Problem: memory leak occurs when we open a federated table
that has its share in the hash.

Fix: free not used memory.

Note: the fix should NOT be merged to 5.1 (the code changed).

davidl-zend/zenddbi,natsys/mariadb_10.2,davidl-zend/zenddbi,flynn1973/mariadb-aix,natsys/mariadb_10.2,ollie314/server,davidl-zend/zenddbi,ollie314/server,ollie314/server,flynn1973/mariadb-aix,slanterns/server,natsys/mariadb_10.2,davidl-zend/zenddbi,flynn1973/mariadb-aix,natsys/mariadb_10.2,ollie314/server,flynn1973/mariadb-aix,natsys/mariadb_10.2,ollie314/server,davidl-zend/zenddbi,ollie314/server,flynn1973/mariadb-aix,davidl-zend/zenddbi,ollie314/server,flynn1973/mariadb-aix,ollie314/server,natsys/mariadb_10.2,ollie314/server,davidl-zend/zenddbi,natsys/mariadb_10.2,ollie314/server,davidl-zend/zenddbi,flynn1973/mariadb-aix,flynn1973/mariadb-aix,davidl-zend/zenddbi,flynn1973/mariadb-aix,davidl-zend/zenddbi,flynn1973/mariadb-aix,natsys/mariadb_10.2,davidl-zend/zenddbi,natsys/mariadb_10.2,flynn1973/mariadb-aix,natsys/mariadb_10.2,ollie314/server,natsys/mariadb_10.2