~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_class.cc

  • Committer: Monty Taylor
  • Date: 2008-10-04 18:48:15 UTC
  • Revision ID: monty@inaugust.com-20081004184815-l4fjpp05h06ibrpj
Removed safeFree.

Show diffs side-by-side

added added

removed removed

Lines of Context:
709
709
  plugin_thdvar_cleanup(this);
710
710
 
711
711
  main_security_ctx.destroy();
712
 
  safeFree(db);
 
712
  if (db)
 
713
  {
 
714
    free(db);
 
715
    db= NULL;
 
716
  }
713
717
  free_root(&warn_root,MYF(0));
714
718
  free_root(&transaction.mem_root,MYF(0));
715
719
  mysys_var=0;                                  // Safety (shouldn't be needed)
2119
2123
void Security_context::destroy()
2120
2124
{
2121
2125
  // If not pointer to constant
2122
 
  safeFree(user);
2123
 
  safeFree(ip);
 
2126
  if (user)
 
2127
  {
 
2128
    free(user);
 
2129
    user= NULL;
 
2130
  }
 
2131
  if (ip)
 
2132
  {
 
2133
    free(ip);
 
2134
    ip= NULL;
 
2135
  }
2124
2136
}
2125
2137
 
2126
2138