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