diff --git a/sql/item_func.cc b/sql/item_func.cc
index ff9be0fc536383b9b441ecc1814c6c3282581ca0..81fd6314d56811d9f36938519c1004a89276de8b 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -4852,7 +4852,7 @@ Item_func_sp::cleanup()
     result_field= NULL;
   }
   m_sp= NULL;
-  dummy_table->s= NULL;
+  dummy_table->alias= NULL;
   Item_func::cleanup();
 }