~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_string.cc

  • Committer: Monty Taylor
  • Author(s): Andrew Hutchings
  • Date: 2010-10-28 16:51:23 UTC
  • mto: (1890.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 1891.
  • Revision ID: mordred@inaugust.com-20101028165123-1r1b210fakp8ievn
Fixed a double free()

Show diffs side-by-side

added added

removed removed

Lines of Context:
117
117
  str_length=0;
118
118
  if (Alloced_length < arg_length)
119
119
  {
120
 
    free();
 
120
    if (Alloced_length > 0)
 
121
      free();
121
122
    if (!(Ptr=(char*) malloc(arg_length)))
122
123
      return true;
123
124
    Alloced_length=arg_length;