Browse Source

Input: fix memory leak in force feedback core

Effects were allocated, but not freed anywhere.

Signed-off-by: Jari Vanhala <ext-jari.vanhala@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Jari Vanhala 15 years ago
parent
commit
6a47081c37
1 changed files with 1 additions and 0 deletions
  1. 1 0
      drivers/input/ff-core.c

+ 1 - 0
drivers/input/ff-core.c

@@ -369,6 +369,7 @@ void input_ff_destroy(struct input_dev *dev)
 		if (ff->destroy)
 		if (ff->destroy)
 			ff->destroy(ff);
 			ff->destroy(ff);
 		kfree(ff->private);
 		kfree(ff->private);
+		kfree(ff->effects);
 		kfree(ff);
 		kfree(ff);
 		dev->ff = NULL;
 		dev->ff = NULL;
 	}
 	}