Fixed potential resource leak in LegacyMySqlStoreFactory.getSql().