Module: wine Branch: master Commit: 53baea13a5b4ff73fbffb213c3ed144bf8846e87 URL: http://source.winehq.org/git/wine.git/?a=commit;h=53baea13a5b4ff73fbffb213c3...
Author: Mike McCormack mike@codeweavers.com Date: Fri Nov 10 15:40:41 2006 +0900
dinput: Use HeapAlloc/Free instead of alloc/free.
---
dlls/dinput/joystick_linuxinput.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/dinput/joystick_linuxinput.c b/dlls/dinput/joystick_linuxinput.c index 47c6e03..18588aa 100644 --- a/dlls/dinput/joystick_linuxinput.c +++ b/dlls/dinput/joystick_linuxinput.c @@ -1469,17 +1469,17 @@ #endif #ifndef HAVE_STRUCT_FF_EFFECT_DIRECTION TRACE("not available (compiled w/o ff support)\n"); *ppdef = NULL; - return DI_OK; + return DI_OK; #else
- new = malloc(sizeof(EffectListItem)); + new = HeapAlloc(GetProcessHeap(), 0, sizeof(EffectListItem)); new->next = This->top_effect; This->top_effect = new;
retval = linuxinput_create_effect(&(This->joyfd), rguid, &(new->ref)); if (retval != DI_OK) return retval; - + if (lpeff != NULL) retval = IDirectInputEffect_SetParameters(new->ref, lpeff, 0); if (retval != DI_OK && retval != DI_DOWNLOADSKIPPED) @@ -1729,12 +1729,12 @@ #ifdef HAVE_STRUCT_FF_EFFECT_DIRECTION /* Stop, unload, release and free all effects */ /* This returns the device to its "bare" state */ while (This->top_effect) { - EffectListItem* temp = This->top_effect; + EffectListItem* temp = This->top_effect; IDirectInputEffect_Stop(temp->ref); IDirectInputEffect_Unload(temp->ref); IDirectInputEffect_Release(temp->ref); - This->top_effect = temp->next; - free(temp); + This->top_effect = temp->next; + HeapFree(GetProcessHeap(), 0, temp); } } else if (dwFlags == DISFFC_PAUSE || dwFlags == DISFFC_CONTINUE) { FIXME("No support for Pause or Continue in linux\n");