diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index e9c634011f0..315b3c56eb3 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -6292,9 +6292,9 @@ int ha_ndbcluster::open(const char *name, int mode, uint test_if_locked) } if (res) { - free_share(m_share); + free_share(&m_share); m_share= 0; - release_metadata(); + release_metadata(current_thd, get_ndb()); DBUG_RETURN(res); } #ifdef HAVE_NDB_BINLOG