lkml.org 
[lkml]   [2011]   [Sep]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 12/24] Staging: hv: mousevsc: Free allocated memory in free_input_device()
Date
Free all allocated memory in free_input_device().

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
---
drivers/staging/hv/hv_mouse.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/staging/hv/hv_mouse.c b/drivers/staging/hv/hv_mouse.c
index 57bc4a3..326d972 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);
}

--
1.7.4.1


\
 
 \ /
  Last update: 2011-09-29 20:37    [W:0.226 / U:1.540 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site