Fixed some lone malloc and free. gsoc2008_force_feedback
authorEdgar Simo <bobbens@gmail.com>
Thu, 31 Jul 2008 17:27:32 +0000
branchgsoc2008_force_feedback
changeset 257772b17d80b426
parent 2576 034440120c38
child 2578 72c4ac55f73c
Fixed some lone malloc and free.
src/joystick/win32/SDL_dxjoystick.c
     1.1 --- a/src/joystick/win32/SDL_dxjoystick.c	Thu Jul 31 17:15:36 2008 +0000
     1.2 +++ b/src/joystick/win32/SDL_dxjoystick.c	Thu Jul 31 17:27:32 2008 +0000
     1.3 @@ -215,7 +215,7 @@
     1.4  
     1.5      /* allocate memory for system specific hardware data */
     1.6      joystick->hwdata =
     1.7 -        (struct joystick_hwdata *) malloc(sizeof(struct joystick_hwdata));
     1.8 +        (struct joystick_hwdata *) SDL_malloc(sizeof(struct joystick_hwdata));
     1.9      if (joystick->hwdata == NULL) {
    1.10          SDL_OutOfMemory();
    1.11          return (-1);
    1.12 @@ -635,7 +635,7 @@
    1.13  
    1.14      if (joystick->hwdata != NULL) {
    1.15          /* free system specific hardware data */
    1.16 -        free(joystick->hwdata);
    1.17 +       SDL_free(joystick->hwdata);
    1.18      }
    1.19  }
    1.20