Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed some lone malloc and free.
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbens committed Jul 31, 2008
1 parent 5e9bfff commit bc09223
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/joystick/win32/SDL_dxjoystick.c
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}
}

Expand Down

0 comments on commit bc09223

Please sign in to comment.