Skip to content

Commit

Permalink
Replaced free() with SDL_free() because related allocation also uses …
Browse files Browse the repository at this point in the history
…wrapper.
  • Loading branch information
philippwiesemann committed Dec 4, 2014
1 parent 8dc56f2 commit 4f26e77
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/haptic/darwin/SDL_syshaptic.c
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/haptic/linux/SDL_syshaptic.c
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/video/directfb/SDL_DirectFB_video.c
Expand Up @@ -156,7 +156,7 @@ DirectFB_CreateDevice(int devindex)
return device;
error:
if (device)
free(device);
SDL_free(device);
return (0);
}

Expand Down

0 comments on commit 4f26e77

Please sign in to comment.