summaryrefslogtreecommitdiff
path: root/sql/sql_acl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r--sql/sql_acl.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index 5a03a5b7324..9329ea3fd28 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -2551,7 +2551,7 @@ my_bool grant_init(THD *org_thd)
do
{
GRANT_TABLE *mem_check;
- if (!(mem_check=new GRANT_TABLE(t_table,c_table)) || !mem_check->ok())
+ if (!(mem_check=new GRANT_TABLE(t_table,c_table)))
{
/* This could only happen if we are out memory */
grant_option= FALSE; /* purecov: deadcode */
@@ -2570,7 +2570,7 @@ my_bool grant_init(THD *org_thd)
}
}
- if (my_hash_insert(&column_priv_hash,(byte*) mem_check))
+ if (mem_check->ok() && my_hash_insert(&column_priv_hash,(byte*) mem_check))
{
grant_option= FALSE;
goto end_unlock;