From 4743b55c7a2bbb8aee4384b6a8c3121a2b446510 Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Wed, 20 Jul 2016 21:01:14 +0200 Subject: [PATCH] Linux: Fixed memory leak in haptic implementation (thanks, Martin!). Fixes Bugzilla #3238. --- src/haptic/linux/SDL_syshaptic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/haptic/linux/SDL_syshaptic.c b/src/haptic/linux/SDL_syshaptic.c index 4918d1266..7bd966449 100644 --- a/src/haptic/linux/SDL_syshaptic.c +++ b/src/haptic/linux/SDL_syshaptic.c @@ -609,7 +609,7 @@ SDL_SYS_HapticQuit(void) /* Opened and not closed haptics are leaked, this is on purpose. * Close your haptic devices after usage. */ SDL_free(item->fname); - item->fname = NULL; + SDL_free(item); } #if SDL_USE_LIBUDEV