~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/drizzletest.cc

  • Committer: Monty Taylor
  • Date: 2008-10-06 01:30:47 UTC
  • Revision ID: monty@inaugust.com-20081006013047-6m2ejc0c4peye2k9
Removed my_free(). It turns out that it had been def'd to ignore the flags passed to it in the second arg anyway. Gotta love that.

Show diffs side-by-side

added added

removed removed

Lines of Context:
803
803
    drizzle_close(&next_con->drizzle);
804
804
    if (next_con->util_drizzle)
805
805
      drizzle_close(next_con->util_drizzle);
806
 
    my_free(next_con->name, MYF(MY_ALLOW_ZERO_PTR));
 
806
    free(next_con->name);
807
807
  }
808
808
  return;
809
809
}
818
818
    {
819
819
      my_fclose(cur_file->file, MYF(0));
820
820
    }
821
 
    my_free((uchar*) cur_file->file_name, MYF(MY_ALLOW_ZERO_PTR));
 
821
    free((uchar*) cur_file->file_name);
822
822
    cur_file->file_name= 0;
823
823
  }
824
824
  return;
848
848
  for (i= 0; i < 10; i++)
849
849
  {
850
850
    if (var_reg[i].alloced_len)
851
 
      my_free(var_reg[i].str_val, MYF(MY_WME));
 
851
      free(var_reg[i].str_val);
852
852
  }
853
853
  while (embedded_server_arg_count > 1)
854
 
    my_free(embedded_server_args[--embedded_server_arg_count],MYF(0));
 
854
    free(embedded_server_args[--embedded_server_arg_count]);
855
855
 
856
856
  free_all_replace();
857
 
  my_free(opt_pass,MYF(MY_ALLOW_ZERO_PTR));
 
857
  free(opt_pass);
858
858
  free_defaults(default_argv);
859
859
 
860
860
  return;
1586
1586
 
1587
1587
void var_free(void *v)
1588
1588
{
1589
 
  my_free(((VAR*) v)->str_val, MYF(MY_WME));
1590
 
  my_free(((VAR*) v)->env_s, MYF(MY_WME|MY_ALLOW_ZERO_PTR));
 
1589
  free(((VAR*) v)->str_val);
 
1590
  free(((VAR*) v)->env_s);
1591
1591
  if (((VAR*)v)->alloced)
1592
 
    my_free(v, MYF(MY_WME));
 
1592
    free(v);
1593
1593
}
1594
1594
 
1595
1595
 
1714
1714
    if (!(v->env_s= my_strdup(buf, MYF(MY_WME))))
1715
1715
      die("Out of memory");
1716
1716
    putenv(v->env_s);
1717
 
    my_free(old_env_s, MYF(MY_ALLOW_ZERO_PTR));
 
1717
    free(old_env_s);
1718
1718
  }
1719
1719
  return;
1720
1720
}
3518
3518
    drizzle_close(con->util_drizzle);
3519
3519
  con->util_drizzle= 0;
3520
3520
 
3521
 
  my_free(con->name, MYF(0));
 
3521
  free(con->name);
3522
3522
 
3523
3523
  /*
3524
3524
    When the connection is closed set name to "-closed_connection-"
4029
4029
        my_fclose(cur_file->file, MYF(0));
4030
4030
        cur_file->file= 0;
4031
4031
      }
4032
 
      my_free((uchar*) cur_file->file_name, MYF(MY_ALLOW_ZERO_PTR));
 
4032
      free((uchar*) cur_file->file_name);
4033
4033
      cur_file->file_name= 0;
4034
4034
      if (cur_file == file_stack)
4035
4035
      {
4598
4598
  case 'p':
4599
4599
    if (argument)
4600
4600
    {
4601
 
      my_free(opt_pass, MYF(MY_ALLOW_ZERO_PTR));
 
4601
      free(opt_pass);
4602
4602
      opt_pass= my_strdup(argument, MYF(MY_FAE));
4603
4603
      while (*argument) *argument++= 'x';    /* Destroy argument */
4604
4604
      tty_password= 0;
5939
5939
    if (!*from)
5940
5940
      die("Wrong number of arguments to replace_column in '%s'", command->query);
5941
5941
    to= get_string(&buff, &from, command);
5942
 
    my_free(replace_column[column_number-1], MY_ALLOW_ZERO_PTR);
 
5942
    free(replace_column[column_number-1]);
5943
5943
    replace_column[column_number-1]= my_strdup(to, MYF(MY_WME | MY_FAE));
5944
5944
    set_if_bigger(max_replace_column, column_number);
5945
5945
  }
5946
 
  my_free(start, MYF(0));
 
5946
  free(start);
5947
5947
  command->last_argument= command->end;
5948
5948
}
5949
5949
 
5955
5955
  {
5956
5956
    if (replace_column[i])
5957
5957
    {
5958
 
      my_free(replace_column[i], 0);
 
5958
      free(replace_column[i]);
5959
5959
      replace_column[i]= 0;
5960
5960
    }
5961
5961
  }
6033
6033
    die("Can't initialize replace from '%s'", command->query);
6034
6034
  free_pointer_array(&from_array);
6035
6035
  free_pointer_array(&to_array);
6036
 
  my_free(start, MYF(0));
 
6036
  free(start);
6037
6037
  command->last_argument= command->end;
6038
6038
  return;
6039
6039
}
6044
6044
 
6045
6045
  if (glob_replace)
6046
6046
  {
6047
 
    my_free(glob_replace,MYF(0));
 
6047
    free(glob_replace);
6048
6048
    glob_replace=0;
6049
6049
  }
6050
6050
  return;
6255
6255
  return res;
6256
6256
 
6257
6257
err:
6258
 
  my_free(res,0);
 
6258
  free(res);
6259
6259
  die("Error parsing replace_regex \"%s\"", expr);
6260
6260
  return 0;
6261
6261
}
6347
6347
  if (glob_replace_regex)
6348
6348
  {
6349
6349
    delete_dynamic(&glob_replace_regex->regex_arr);
6350
 
    my_free(glob_replace_regex->even_buf,MYF(MY_ALLOW_ZERO_PTR));
6351
 
    my_free(glob_replace_regex->odd_buf,MYF(MY_ALLOW_ZERO_PTR));
6352
 
    my_free(glob_replace_regex,MYF(0));
 
6350
    free(glob_replace_regex->even_buf);
 
6351
    free(glob_replace_regex->odd_buf);
 
6352
    free(glob_replace_regex);
6353
6353
    glob_replace_regex=0;
6354
6354
  }
6355
6355
}
6533
6533
  if (!(follow=(FOLLOWS*) my_malloc((states+2)*sizeof(FOLLOWS),MYF(MY_WME))))
6534
6534
  {
6535
6535
    free_sets(&sets);
6536
 
    my_free(found_set,MYF(0));
 
6536
    free(found_set);
6537
6537
    return(0);
6538
6538
  }
6539
6539
 
6755
6755
          replace[i].next[j]=(REPLACE*) (rep_str+(-sets.set[i].next[j]-1));
6756
6756
    }
6757
6757
  }
6758
 
  my_free(follow,MYF(0));
 
6758
  free(follow);
6759
6759
  free_sets(&sets);
6760
 
  my_free(found_set,MYF(0));
 
6760
  free(found_set);
6761
6761
  return(replace);
6762
6762
}
6763
6763
 
6772
6772
  if (!(sets->bit_buffer=(uint*) my_malloc(sizeof(uint)*sets->size_of_bits*
6773
6773
                                           SET_MALLOC_HUNC,MYF(MY_WME))))
6774
6774
  {
6775
 
    my_free(sets->set,MYF(0));
 
6775
    free(sets->set);
6776
6776
    return 1;
6777
6777
  }
6778
6778
  return 0;
6833
6833
 
6834
6834
void free_sets(REP_SETS *sets)
6835
6835
{
6836
 
  my_free(sets->set_buffer,MYF(0));
6837
 
  my_free(sets->bit_buffer,MYF(0));
 
6836
  free(sets->set_buffer);
 
6837
  free(sets->bit_buffer);
6838
6838
  return;
6839
6839
}
6840
6840
 
6971
6971
    if (!(pa->str= (uchar*) my_malloc((uint) (PS_MALLOC-MALLOC_OVERHEAD),
6972
6972
                                      MYF(MY_WME))))
6973
6973
    {
6974
 
      my_free((char*) pa->typelib.type_names,MYF(0));
 
6974
      free((char*) pa->typelib.type_names);
6975
6975
      return (-1);
6976
6976
    }
6977
6977
    pa->max_count=(PC_MALLOC-MALLOC_OVERHEAD)/(sizeof(uchar*)+
7032
7032
  if (pa->typelib.count)
7033
7033
  {
7034
7034
    pa->typelib.count=0;
7035
 
    my_free((char*) pa->typelib.type_names,MYF(0));
 
7035
    free((char*) pa->typelib.type_names);
7036
7036
    pa->typelib.type_names=0;
7037
 
    my_free(pa->str,MYF(0));
 
7037
    free(pa->str);
7038
7038
  }
7039
7039
} /* free_pointer_array */
7040
7040