From 2cca4cd3393689b2e7fe0b2371dc891b135d5802 Mon Sep 17 00:00:00 2001 From: Edgar Simo Date: Thu, 31 Jul 2008 10:21:11 +0000 Subject: [PATCH] Fixed memory leak. --- src/haptic/darwin/SDL_syshaptic.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/haptic/darwin/SDL_syshaptic.c b/src/haptic/darwin/SDL_syshaptic.c index 2b0d98e09..326db222b 100644 --- a/src/haptic/darwin/SDL_syshaptic.c +++ b/src/haptic/darwin/SDL_syshaptic.c @@ -1103,8 +1103,7 @@ SDL_SYS_HapticDestroyEffect(SDL_Haptic * haptic, struct haptic_effect * effect) 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; }