Fixed memory leak. gsoc2008_force_feedback
authorEdgar Simo <bobbens@gmail.com>
Thu, 31 Jul 2008 10:21:11 +0000
branchgsoc2008_force_feedback
changeset 2562c284ce0cd8e0
parent 2561 3696b9ce8a37
child 2563 be2ea885d70b
Fixed memory leak.
src/haptic/darwin/SDL_syshaptic.c
     1.1 --- a/src/haptic/darwin/SDL_syshaptic.c	Thu Jul 31 09:45:27 2008 +0000
     1.2 +++ b/src/haptic/darwin/SDL_syshaptic.c	Thu Jul 31 10:21:11 2008 +0000
     1.3 @@ -1103,8 +1103,7 @@
     1.4        SDL_SetError("Haptic: Error removing the effect from the device: %s.",
     1.5                     FFStrError(ret));
     1.6     }
     1.7 -   SDL_free(effect->hweffect->effect.lpvTypeSpecificParams);
     1.8 -   effect->hweffect->effect.lpvTypeSpecificParams = NULL;
     1.9 +   SDL_SYS_HapticFreeFFEFFECT(&effect->hweffect->effect, effect->effect.type);
    1.10     SDL_free(effect->hweffect);
    1.11     effect->hweffect = NULL;
    1.12  }