From 4f26e7760ac6fe6a9c7a2c01ae466f5b5251d070 Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Thu, 4 Dec 2014 21:41:30 +0100 Subject: [PATCH] Replaced free() with SDL_free() because related allocation also uses wrapper. --- src/haptic/darwin/SDL_syshaptic.c | 2 +- src/haptic/linux/SDL_syshaptic.c | 4 ++-- src/video/directfb/SDL_DirectFB_video.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/haptic/darwin/SDL_syshaptic.c b/src/haptic/darwin/SDL_syshaptic.c index 6d85bf0ed..a74f008b7 100644 --- a/src/haptic/darwin/SDL_syshaptic.c +++ b/src/haptic/darwin/SDL_syshaptic.c @@ -551,7 +551,7 @@ SDL_SYS_HapticOpenFromService(SDL_Haptic * haptic, io_service_t service) FFReleaseDevice(haptic->hwdata->device); creat_err: if (haptic->hwdata != NULL) { - free(haptic->hwdata); + SDL_free(haptic->hwdata); haptic->hwdata = NULL; } return -1; diff --git a/src/haptic/linux/SDL_syshaptic.c b/src/haptic/linux/SDL_syshaptic.c index bab3ddbf8..63c81ab9b 100644 --- a/src/haptic/linux/SDL_syshaptic.c +++ b/src/haptic/linux/SDL_syshaptic.c @@ -441,7 +441,7 @@ SDL_SYS_HapticOpenFromFD(SDL_Haptic * haptic, int fd) open_err: close(fd); if (haptic->hwdata != NULL) { - free(haptic->hwdata); + SDL_free(haptic->hwdata); haptic->hwdata = NULL; } return -1; @@ -959,7 +959,7 @@ SDL_SYS_HapticNewEffect(SDL_Haptic * haptic, struct haptic_effect *effect, return 0; new_effect_err: - free(effect->hweffect); + SDL_free(effect->hweffect); effect->hweffect = NULL; return -1; } diff --git a/src/video/directfb/SDL_DirectFB_video.c b/src/video/directfb/SDL_DirectFB_video.c index 0d107dc98..35379cb95 100644 --- a/src/video/directfb/SDL_DirectFB_video.c +++ b/src/video/directfb/SDL_DirectFB_video.c @@ -156,7 +156,7 @@ DirectFB_CreateDevice(int devindex) return device; error: if (device) - free(device); + SDL_free(device); return (0); }