Staging: hv: mousevsc: Free allocated memory in free_input_device()
authorK. Y. Srinivasan <kys@microsoft.com>
Thu, 29 Sep 2011 18:54:52 +0000 (11:54 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 4 Oct 2011 17:39:34 +0000 (10:39 -0700)
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/hv/hv_mouse.c

index 57bc4a3..326d972 100644 (file)
@@ -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);
 }