diff src/haptic/darwin/SDL_syshaptic.c @ 2562:c284ce0cd8e0 gsoc2008_force_feedback

Fixed memory leak.
author Edgar Simo <bobbens@gmail.com>
date Thu, 31 Jul 2008 10:21:11 +0000
parents 3696b9ce8a37
children be2ea885d70b
line wrap: on
line diff
--- 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;
 }