diff src/joystick/win32/SDL_dxjoystick.c @ 2577:72b17d80b426 gsoc2008_force_feedback

Fixed some lone malloc and free.
author Edgar Simo <bobbens@gmail.com>
date Thu, 31 Jul 2008 17:27:32 +0000
parents 034440120c38
children bd2a6c70cb29
line wrap: on
line diff
--- a/src/joystick/win32/SDL_dxjoystick.c	Thu Jul 31 17:15:36 2008 +0000
+++ b/src/joystick/win32/SDL_dxjoystick.c	Thu Jul 31 17:27:32 2008 +0000
@@ -215,7 +215,7 @@
 
     /* allocate memory for system specific hardware data */
     joystick->hwdata =
-        (struct joystick_hwdata *) malloc(sizeof(struct joystick_hwdata));
+        (struct joystick_hwdata *) SDL_malloc(sizeof(struct joystick_hwdata));
     if (joystick->hwdata == NULL) {
         SDL_OutOfMemory();
         return (-1);
@@ -635,7 +635,7 @@
 
     if (joystick->hwdata != NULL) {
         /* free system specific hardware data */
-        free(joystick->hwdata);
+       SDL_free(joystick->hwdata);
     }
 }