~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/authentication.cc

Merged with trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
{
55
55
  authentication_st *authen;
56
56
 
57
 
  if ((authen= (authentication_st *)malloc(sizeof(authentication_st))) == 0)
58
 
      return(1);
 
57
  authen= new authentication_st;
 
58
 
 
59
  if (authen == NULL)
 
60
    return 1;
59
61
 
60
62
  memset(authen, 0, sizeof(authentication_st));
61
63
 
74
76
 
75
77
  return(0);
76
78
err:
77
 
  free(authen);
 
79
  delete authen;
78
80
  return(1);
79
81
}
80
82
 
86
88
  if (authen && plugin->plugin->deinit)
87
89
    plugin->plugin->deinit(authen);
88
90
 
89
 
  free(authen);
 
91
  delete authen;
90
92
 
91
93
  return(0);
92
94
}