effect_position.c
changeset 561 87bdb4c81c0b
parent 518 8bc9b5fd2aae
child 601 05123263dab3
child 887 e49459791ae8
     1.1 --- a/effect_position.c	Fri Jan 13 02:39:41 2012 -0500
     1.2 +++ b/effect_position.c	Fri Jan 13 03:15:19 2012 -0500
     1.3 @@ -85,14 +85,14 @@
     1.4  {
     1.5      int i;
     1.6      for (i = 0; i < position_channels; i++) {
     1.7 -        free(pos_args_array[i]);
     1.8 +        SDL_free(pos_args_array[i]);
     1.9      }
    1.10  
    1.11      position_channels = 0;
    1.12  
    1.13 -    free(pos_args_global);
    1.14 +    SDL_free(pos_args_global);
    1.15      pos_args_global = NULL;
    1.16 -    free(pos_args_array);
    1.17 +    SDL_free(pos_args_array);
    1.18      pos_args_array = NULL;
    1.19  }
    1.20  
    1.21 @@ -102,13 +102,13 @@
    1.22  {
    1.23      if (channel < 0) {
    1.24          if (pos_args_global != NULL) {
    1.25 -            free(pos_args_global);
    1.26 +            SDL_free(pos_args_global);
    1.27              pos_args_global = NULL;
    1.28          }
    1.29      }
    1.30  
    1.31      else if (pos_args_array[channel] != NULL) {
    1.32 -        free(pos_args_array[channel]);
    1.33 +        SDL_free(pos_args_array[channel]);
    1.34          pos_args_array[channel] = NULL;
    1.35      }
    1.36  }
    1.37 @@ -1149,7 +1149,7 @@
    1.38  
    1.39      if (channel < 0) {
    1.40          if (pos_args_global == NULL) {
    1.41 -            pos_args_global = malloc(sizeof (position_args));
    1.42 +            pos_args_global = SDL_malloc(sizeof (position_args));
    1.43              if (pos_args_global == NULL) {
    1.44                  Mix_SetError("Out of memory");
    1.45                  return(NULL);
    1.46 @@ -1161,7 +1161,7 @@
    1.47      }
    1.48  
    1.49      if (channel >= position_channels) {
    1.50 -        rc = realloc(pos_args_array, (channel + 1) * sizeof (position_args *));
    1.51 +        rc = SDL_realloc(pos_args_array, (channel + 1) * sizeof (position_args *));
    1.52          if (rc == NULL) {
    1.53              Mix_SetError("Out of memory");
    1.54              return(NULL);
    1.55 @@ -1174,7 +1174,7 @@
    1.56      }
    1.57  
    1.58      if (pos_args_array[channel] == NULL) {
    1.59 -        pos_args_array[channel] = (position_args *)malloc(sizeof(position_args));
    1.60 +        pos_args_array[channel] = (position_args *)SDL_malloc(sizeof(position_args));
    1.61          if (pos_args_array[channel] == NULL) {
    1.62              Mix_SetError("Out of memory");
    1.63              return(NULL);