Linux: Fixed memory leak in haptic implementation (thanks, Martin!).
authorPhilipp Wiesemann <philipp.wiesemann@arcor.de>
Wed, 20 Jul 2016 21:01:14 +0200
changeset 10209 afd286e26823
parent 10208 49c460371a4a
child 10210 1b5a21b3fa97
Linux: Fixed memory leak in haptic implementation (thanks, Martin!). Fixes Bugzilla #3238.
src/haptic/linux/SDL_syshaptic.c
--- a/src/haptic/linux/SDL_syshaptic.c	Wed Jul 20 21:00:52 2016 +0200
+++ b/src/haptic/linux/SDL_syshaptic.c	Wed Jul 20 21:01:14 2016 +0200
@@ -609,7 +609,7 @@
         /* 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