comparison 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
comparison
equal deleted inserted replaced
2561:3696b9ce8a37 2562:c284ce0cd8e0
1101 ret = FFDeviceReleaseEffect(haptic->hwdata->device, effect->hweffect->ref); 1101 ret = FFDeviceReleaseEffect(haptic->hwdata->device, effect->hweffect->ref);
1102 if (ret != FF_OK) { 1102 if (ret != FF_OK) {
1103 SDL_SetError("Haptic: Error removing the effect from the device: %s.", 1103 SDL_SetError("Haptic: Error removing the effect from the device: %s.",
1104 FFStrError(ret)); 1104 FFStrError(ret));
1105 } 1105 }
1106 SDL_free(effect->hweffect->effect.lpvTypeSpecificParams); 1106 SDL_SYS_HapticFreeFFEFFECT(&effect->hweffect->effect, effect->effect.type);
1107 effect->hweffect->effect.lpvTypeSpecificParams = NULL;
1108 SDL_free(effect->hweffect); 1107 SDL_free(effect->hweffect);
1109 effect->hweffect = NULL; 1108 effect->hweffect = NULL;
1110 } 1109 }
1111 1110
1112 1111