~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table.cc

  • Committer: Monty Taylor
  • Date: 2008-10-04 17:33:56 UTC
  • Revision ID: monty@inaugust.com-20081004173356-udagzm2uxfsbk4un
RemovedĀ x_freeĀ calls.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1097
1097
  }
1098
1098
  else
1099
1099
    share->primary_key= MAX_KEY;
1100
 
  x_free((uchar*) disk_buff);
1101
 
  disk_buff=0;
 
1100
  if (disk_buff)
 
1101
    free(disk_buff);
 
1102
  disk_buff= NULL;
1102
1103
  if (new_field_pack_flag <= 1)
1103
1104
  {
1104
1105
    /* Old file format with default as not null */
1169
1170
  share->error= error;
1170
1171
  share->open_errno= my_errno;
1171
1172
  share->errarg= errarg;
1172
 
  x_free((uchar*) disk_buff);
 
1173
  if (disk_buff)
 
1174
    free(disk_buff);
1173
1175
  delete handler_file;
1174
1176
  hash_free(&share->name_hash);
1175
1177
 
1521
1523
        my_read(file, buf+a_length, (size_t) (length+names*4),
1522
1524
                MYF(MY_NABP)))
1523
1525
    {                                           /* purecov: inspected */
1524
 
      x_free((uchar*) buf);                     /* purecov: inspected */
 
1526
      if (buf)
 
1527
        free(buf);
1525
1528
      return(0L);                               /* purecov: inspected */
1526
1529
    }
1527
1530
    pos= buf+a_length+length;
1554
1557
int read_string(File file, uchar**to, size_t length)
1555
1558
{
1556
1559
 
1557
 
  x_free(*to);
 
1560
  if (*to)
 
1561
    free(*to);
1558
1562
  if (!(*to= (uchar*) my_malloc(length+1,MYF(MY_WME))) ||
1559
1563
      my_read(file, *to, length,MYF(MY_NABP)))
1560
1564
  {
1561
 
    x_free(*to);                              /* purecov: inspected */
1562
 
    *to= 0;                                   /* purecov: inspected */
 
1565
    if (*to)
 
1566
      free(*to);
 
1567
    *to= NULL;
1563
1568
    return(1);                           /* purecov: inspected */
1564
1569
  }
1565
1570
  *((char*) *to+length)= '\0';