From: K. Y. Srinivasan Date: Thu, 29 Sep 2011 18:54:52 +0000 (-0700) Subject: Staging: hv: mousevsc: Free allocated memory in free_input_device() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=ea8646b92feea6de86dae44a879364758b6a4dcb;p=openwrt%2Fstaging%2Fblogic.git Staging: hv: mousevsc: Free allocated memory in free_input_device() Free all allocated memory in free_input_device(). Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/hv/hv_mouse.c b/drivers/staging/hv/hv_mouse.c index 57bc4a3d1fd7..326d97239468 100644 --- a/drivers/staging/hv/hv_mouse.c +++ b/drivers/staging/hv/hv_mouse.c @@ -199,6 +199,8 @@ static struct mousevsc_dev *alloc_input_device(struct hv_device *device) static void free_input_device(struct mousevsc_dev *device) { WARN_ON(atomic_read(&device->ref_count) != 0); + kfree(device->hid_desc); + kfree(device->report_desc); kfree(device); }