Linux: Fixed memory leak in haptic implementation (thanks, Martin!). Fixes Bugzilla #3238.
diff --git a/src/haptic/linux/SDL_syshaptic.c b/src/haptic/linux/SDL_syshaptic.c
index 4918d12..7bd9664 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