From bc0922320da06d689423373c6895a3996a1b14f7 Mon Sep 17 00:00:00 2001 From: Edgar Simo Date: Thu, 31 Jul 2008 17:27:32 +0000 Subject: [PATCH] Fixed some lone malloc and free. --- src/joystick/win32/SDL_dxjoystick.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/joystick/win32/SDL_dxjoystick.c b/src/joystick/win32/SDL_dxjoystick.c index 50cb2b859..91af3833c 100644 --- a/src/joystick/win32/SDL_dxjoystick.c +++ b/src/joystick/win32/SDL_dxjoystick.c @@ -215,7 +215,7 @@ SDL_SYS_JoystickOpen(SDL_Joystick * joystick) /* 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 @@ SDL_SYS_JoystickClose(SDL_Joystick * joystick) if (joystick->hwdata != NULL) { /* free system specific hardware data */ - free(joystick->hwdata); + SDL_free(joystick->hwdata); } }